Commit 915e5a48 by guojuxing

账号分组接口

parent 64ba4578
package com.gic.cloud.dto;
import java.io.Serializable;
import java.util.Date;
/**
* 账号分组
* @ClassName: AccountGroupDTO

* @Description: 

* @author guojuxing

* @date 2020/7/6 10:14 AM

*/
public class AccountGroupDTO implements Serializable{
private static final long serialVersionUID = 6446178603866559817L;
/**
* ID
*/
private Integer accountGroupId;
/**
* 账号名称
*/
private String accountGroupName;
/**
*
*/
private Integer enterpriseId;
/**
* 1:有效 0:无效
*/
private Integer status;
/**
* 排序
*/
private Integer sort;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 用户个数
*/
private Integer memberCount;
public Integer getAccountGroupId() {
return accountGroupId;
}
public AccountGroupDTO setAccountGroupId(Integer accountGroupId) {
this.accountGroupId = accountGroupId;
return this;
}
public String getAccountGroupName() {
return accountGroupName;
}
public AccountGroupDTO setAccountGroupName(String accountGroupName) {
this.accountGroupName = accountGroupName;
return this;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public AccountGroupDTO setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
return this;
}
public Integer getStatus() {
return status;
}
public AccountGroupDTO setStatus(Integer status) {
this.status = status;
return this;
}
public Integer getSort() {
return sort;
}
public AccountGroupDTO setSort(Integer sort) {
this.sort = sort;
return this;
}
public Date getCreateTime() {
return createTime;
}
public AccountGroupDTO setCreateTime(Date createTime) {
this.createTime = createTime;
return this;
}
public Date getUpdateTime() {
return updateTime;
}
public AccountGroupDTO setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
return this;
}
public Integer getMemberCount() {
return memberCount;
}
public AccountGroupDTO setMemberCount(Integer memberCount) {
this.memberCount = memberCount;
return this;
}
}
package com.gic.cloud.service;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.cloud.dto.AccountGroupDTO;
import java.util.List;
/**
* 账号分组接口
* @ClassName: AccountGroupApiService

* @Description: 

* @author guojuxing

* @date 2020/7/6 10:14 AM

*/
public interface AccountGroupApiService {
/**
* 新增账号分组
* @Title: saveAccountGroup

* @Description:

* @author guojuxing
* @param dto

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Integer>


*/
ServiceResponse<Integer> saveAccountGroup(AccountGroupDTO dto);
ServiceResponse<Void> editAccountGroup(AccountGroupDTO dto);
/**
* 排序
* @Title: sortAccountGroup

* @Description:

* @author guojuxing
* @param accountGroupId
* @param targetSort

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


*/
ServiceResponse<Void> sortAccountGroup(Integer accountGroupId, Integer targetSort);
/**
* 账号分组列表,带用户数量统计
* @Title: listAccountGroupOfCountMember

* @Description:

* @author guojuxing
* @param enterpriseId

* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.cloud.dto.AccountGroupDTO>>


*/
ServiceResponse<List<AccountGroupDTO>> listAccountGroupOfCountMember(Integer enterpriseId);
ServiceResponse<Void> deleteAccountGroup(Integer accountGroupId);
}
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>
<libraryVersion>4.0-SNAPSHOT</libraryVersion> <libraryVersion>4.0-SNAPSHOT</libraryVersion>
<gic-sharding-sdk>3.1-SNAPSHOT</gic-sharding-sdk> <gic-sharding-sdk>3.1-SNAPSHOT</gic-sharding-sdk>
<gic-data-cloud-api>4.0-SNAPSHOT</gic-data-cloud-api>
<!-- api依赖,正式版会在 gic-pom-base 里生成 --> <!-- api依赖,正式版会在 gic-pom-base 里生成 -->
</properties> </properties>
...@@ -115,6 +116,11 @@ ...@@ -115,6 +116,11 @@
<version>${gic-platform-enterprise-api}</version> <version>${gic-platform-enterprise-api}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.gic</groupId>
<artifactId>gic-data-cloud-api</artifactId>
<version>${gic-data-cloud-api}</version>
</dependency>
<dependency>
<groupId>com.gic </groupId> <groupId>com.gic </groupId>
<artifactId>gic-job-sdk</artifactId> <artifactId>gic-job-sdk</artifactId>
<version>${gic-job-sdk}</version> <version>${gic-job-sdk}</version>
......
package com.gic.cloud.dao.mapper;
import com.gic.cloud.entity.TabSysAccountGroup;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface TabSysAccountGroupMapper {
/**
* 根据主键删除
*
* @param accountGroupId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer accountGroupId);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insert(TabSysAccountGroup record);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insertSelective(TabSysAccountGroup record);
/**
* 根据主键查询
*
* @param accountGroupId 主键
* @return 实体对象
*/
TabSysAccountGroup selectByPrimaryKey(Integer accountGroupId);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKeySelective(TabSysAccountGroup record);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKey(TabSysAccountGroup record);
int countByAccountGroupName(@Param("enterpriseId") Integer enterpriseId,
@Param("accountGroupId") Integer accountGroupId,
@Param("accountGroupName") String accountGroupName);
int queryMaxSort(@Param("enterpriseId") Integer enterpriseId);
List<TabSysAccountGroup> listAccountGroupOrderBySort(@Param("enterpriseId") Integer enterpriseId);
int deleteAccountGroup(@Param("accountGroupId")Integer accountGroupId);
}
\ No newline at end of file
package com.gic.cloud.entity;
import java.util.Date;
/**
* tab_sys_account_group
*/
public class TabSysAccountGroup {
/**
* ID
*/
private Integer accountGroupId;
/**
* 账号名称
*/
private String accountGroupName;
/**
*
*/
private Integer enterpriseId;
/**
* 1:有效 0:无效
*/
private Integer status;
/**
* 排序
*/
private Integer sort;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
public Integer getAccountGroupId() {
return accountGroupId;
}
public TabSysAccountGroup setAccountGroupId(Integer accountGroupId) {
this.accountGroupId = accountGroupId;
return this;
}
public String getAccountGroupName() {
return accountGroupName;
}
public TabSysAccountGroup setAccountGroupName(String accountGroupName) {
this.accountGroupName = accountGroupName;
return this;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public TabSysAccountGroup setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
return this;
}
public Integer getStatus() {
return status;
}
public TabSysAccountGroup setStatus(Integer status) {
this.status = status;
return this;
}
public Integer getSort() {
return sort;
}
public TabSysAccountGroup setSort(Integer sort) {
this.sort = sort;
return this;
}
public Date getCreateTime() {
return createTime;
}
public TabSysAccountGroup setCreateTime(Date createTime) {
this.createTime = createTime;
return this;
}
public Date getUpdateTime() {
return updateTime;
}
public TabSysAccountGroup setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
return this;
}
}
\ No newline at end of file
package com.gic.cloud.service;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.cloud.dto.AccountGroupDTO;
import com.gic.cloud.entity.TabSysAccountGroup;
import java.util.List;
public interface AccountGroupService {
Integer saveAccountGroup(AccountGroupDTO dto);
void editAccountGroup(AccountGroupDTO dto);
/**
* 判断是否账号分组名称重复
* @Title: isRepeatAccountGroupName

* @Description:

* @author guojuxing
* @param enterpriseId
* @param accountGroupId
* @param accountGroupName

* @return boolean


*/
boolean isRepeatAccountGroupName(Integer enterpriseId, Integer accountGroupId, String accountGroupName);
/**
* 查询商户最大账号分组的序号值
* @param enterpriseId
* @return
*/
int queryMaxSort(Integer enterpriseId);
/**
* 查询详情
* @Title: getAccountGroupById

* @Description:

* @author guojuxing
* @param accountGroupId

* @return com.gic.cloud.entity.TabSysAccountGroup


*/
TabSysAccountGroup getAccountGroupById(Integer accountGroupId);
void sortAccountGroup(TabSysAccountGroup record, Integer targetSort);
List<TabSysAccountGroup> listAccountGroupOrderBySort(Integer enterpriseId);
void deleteAccountGroup(Integer accountGroupId);
}
package com.gic.cloud.service.impl;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gic.cloud.dao.mapper.TabSysAccountGroupMapper;
import com.gic.cloud.dto.AccountGroupDTO;
import com.gic.cloud.entity.TabSysAccountGroup;
import com.gic.cloud.service.AccountGroupService;
import com.gic.commons.util.EntityUtil;
@Service("accountGroupService")
public class AccountGroupServiceImpl implements AccountGroupService{
@Autowired
private TabSysAccountGroupMapper tabSysAccountGroupMapper;
@Override
public Integer saveAccountGroup(AccountGroupDTO dto) {
Date now = new Date();
dto.setUpdateTime(now);
dto.setCreateTime(now);
TabSysAccountGroup record = EntityUtil.changeEntityNew(TabSysAccountGroup.class, dto);
return tabSysAccountGroupMapper.insert(record);
}
@Override
public void editAccountGroup(AccountGroupDTO dto) {
TabSysAccountGroup record = EntityUtil.changeEntityNew(TabSysAccountGroup.class, dto);
record.setUpdateTime(new Date());
tabSysAccountGroupMapper.updateByPrimaryKeySelective(record);
}
@Override
public boolean isRepeatAccountGroupName(Integer enterpriseId, Integer accountGroupId, String accountGroupName) {
int count = tabSysAccountGroupMapper.countByAccountGroupName(enterpriseId, accountGroupId, accountGroupName);
if (count > 0) {
return true;
}
return false;
}
@Override
public int queryMaxSort(Integer enterpriseId) {
return tabSysAccountGroupMapper.queryMaxSort(enterpriseId);
}
@Override
public TabSysAccountGroup getAccountGroupById(Integer accountGroupId) {
return tabSysAccountGroupMapper.selectByPrimaryKey(accountGroupId);
}
@Override
public void sortAccountGroup(TabSysAccountGroup record, Integer targetSort) {
List<TabSysAccountGroup> list = tabSysAccountGroupMapper.listAccountGroupOrderBySort(record.getEnterpriseId());
Integer originalSort = record.getSort();
if (originalSort > targetSort) {
//向上拖拽
for (int i = 0, length = list.size(); i < length; i++) {
TabSysAccountGroup temp = list.get(i);
//如果大于targetSort,都需要降低排序值,往后推
boolean isNeedDown = temp.getSort() >= targetSort && temp.getSort() < originalSort;
if (isNeedDown) {
updateSort(list.get(i + 1).getSort(), temp.getAccountGroupId());
}
}
} else if (originalSort < targetSort) {
//向下拖拽
for (int i = 0, length = list.size(); i < length; i++) {
TabSysAccountGroup temp = list.get(i);
boolean isNeedUp = temp.getSort() <= targetSort && temp.getSort() > originalSort;
if (isNeedUp) {
updateSort(list.get(i - 1).getSort(), temp.getAccountGroupId());
}
}
}
updateSort(targetSort, record.getAccountGroupId());
}
@Override
public List<TabSysAccountGroup> listAccountGroupOrderBySort(Integer enterpriseId) {
return tabSysAccountGroupMapper.listAccountGroupOrderBySort(enterpriseId);
}
@Override
public void deleteAccountGroup(Integer accountGroupId) {
tabSysAccountGroupMapper.deleteAccountGroup(accountGroupId);
}
private void updateSort(Integer sort, Integer accountGroupId) {
TabSysAccountGroup record = new TabSysAccountGroup();
record.setAccountGroupId(accountGroupId);
record.setSort(sort);
tabSysAccountGroupMapper.updateByPrimaryKeySelective(record);
}
}
package com.gic.cloud.service.outer.impl;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.cloud.dto.AccountGroupDTO;
import com.gic.cloud.entity.TabSysAccountGroup;
import com.gic.cloud.service.AccountGroupApiService;
import com.gic.cloud.service.AccountGroupService;
import com.gic.commons.util.EntityUtil;
import com.gic.enterprise.error.ErrorCode;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Collections;
import java.util.List;
@Service("accountGroupApiService")
public class AccountGroupApiServiceImpl implements AccountGroupApiService{
@Autowired
private AccountGroupService accountGroupService;
@Override
public ServiceResponse<Integer> saveAccountGroup(AccountGroupDTO dto) {
//valid param
String accountGroupName = dto.getAccountGroupName();
Integer enterpriseId = dto.getEnterpriseId();
if (StringUtils.isBlank(accountGroupName)) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "账号分组名称不能为空");
}
if (enterpriseId == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "商户ID不能为空");
}
if (accountGroupService.isRepeatAccountGroupName(enterpriseId, null, accountGroupName)) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "账号分组名称重复");
}
dto.setSort(accountGroupService.queryMaxSort(enterpriseId) + 1);
return ServiceResponse.success(accountGroupService.saveAccountGroup(dto));
}
@Override
public ServiceResponse<Void> editAccountGroup(AccountGroupDTO dto) {
Integer accountGroupId = dto.getAccountGroupId();
TabSysAccountGroup record = accountGroupService.getAccountGroupById(accountGroupId);
if (record == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "账号分组ID错误,查无数据");
}
String accountGroupName = dto.getAccountGroupName();
if (StringUtils.isBlank(accountGroupName)) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "账号分组名称不能为空");
}
if (accountGroupService.isRepeatAccountGroupName(record.getEnterpriseId(), accountGroupId, accountGroupName)) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "账号分组名称重复");
}
dto.setEnterpriseId(record.getEnterpriseId());
dto.setSort(record.getSort());
accountGroupService.editAccountGroup(dto);
return ServiceResponse.success();
}
@Override
public ServiceResponse<Void> sortAccountGroup(Integer accountGroupId, Integer targetSort) {
TabSysAccountGroup record = accountGroupService.getAccountGroupById(accountGroupId);
if (record == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "账号分组ID错误,查无数据");
}
int maxSort = accountGroupService.queryMaxSort(record.getEnterpriseId());
if (targetSort > maxSort || targetSort < 1) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "排序值非法");
}
accountGroupService.sortAccountGroup(record, targetSort);
return ServiceResponse.success();
}
@Override
public ServiceResponse<List<AccountGroupDTO>> listAccountGroupOfCountMember(Integer enterpriseId) {
List<TabSysAccountGroup> list = accountGroupService.listAccountGroupOrderBySort(enterpriseId);
if (CollectionUtils.isNotEmpty(list)) {
//todo 统计用户数量
return ServiceResponse.success(EntityUtil.changeEntityListNew(AccountGroupDTO.class, list));
}
return ServiceResponse.success(Collections.emptyList());
}
@Override
public ServiceResponse<Void> deleteAccountGroup(Integer accountGroupId) {
TabSysAccountGroup record = accountGroupService.getAccountGroupById(accountGroupId);
if (record == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "账号分组ID错误,查无数据");
}
accountGroupService.deleteAccountGroup(accountGroupId);
//todo 删除分组下的用户
return ServiceResponse.success();
}
}
...@@ -9,138 +9,11 @@ ...@@ -9,138 +9,11 @@
http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/context/spring-context.xsd
http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd"> http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
<context:component-scan base-package="com.gic.enterprise.*"/> <context:component-scan base-package="com.gic.cloud.*"/>
<!-- 应用名称 --> <!-- 应用名称 -->
<dubbo:application name="gic-platform-enterprise-service"/> <dubbo:application name="gic-data-cloud-service"/>
<dubbo:protocol name="dubbo" port="20360"/> <dubbo:protocol name="dubbo" port="20370"/>
<dubbo:service interface="com.gic.cloud.service.AccountGroupApiService" ref="accountGroupApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.EnterpriseApiService" ref="enterpriseApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.EnterpriseInitApiService" ref="enterpriseInitApiService" timeout="6000" />
<dubbo:reference interface="com.gic.log.api.service.LogApiService" id="logApiService" timeout="6000" />
<!--用户-->
<dubbo:reference interface="com.gic.auth.service.UserApiService" id="userApiService" timeout="6000" />
<!--品牌库-->
<dubbo:service interface="com.gic.enterprise.service.PlatformBrandApiService" ref="platformBrandApiService" timeout="6000" />
<!-- 字典 -->
<dubbo:reference interface="com.gic.bizdict.api.service.BizdictService" id="bizdictService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.DictApiService" ref="dictApiService" timeout="6000" />
<!--支付信息-->
<dubbo:service interface="com.gic.enterprise.service.BillingPayInfoApiService" ref="billingPayInfoApiService" timeout="6000" />
<!--计费中心余额账户-->
<dubbo:service interface="com.gic.enterprise.service.BillingAccountApiService" ref="billingAccountApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.PackageApiService" ref="packageApiService" timeout="6000" />
<!-- 充值 -->
<dubbo:service interface="com.gic.enterprise.service.BillingRechargeApiService" ref="billingRechargeApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.BillingRechargeRecordApiService" ref="billingRechargeRecordApiService" timeout="6000" />
<!--首页资源监控图表-->
<dubbo:service interface="com.gic.enterprise.service.HomeStatisticsApiService" ref="homeStatisticsApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.BillingOrderApiService" ref="billingOrderApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.HomeStatisticsApiService" ref="homeStatisticsApiService" timeout="60000" />
<dubbo:service interface="com.gic.enterprise.service.BillingOrderApiService" ref="billingOrderApiService" timeout="60000" />
<!--微信支付-->
<dubbo:reference interface="com.gic.thirdparty.api.service.Pay4WXService" id="pay4WXService" timeout="6000" />
<!--卡券-->
<dubbo:service interface="com.gic.enterprise.service.BillingCouponCardApiService" ref="billingCouponCardApiService" timeout="6000" />
<!-- 转账审批 -->
<dubbo:reference interface="com.gic.finance.service.TransferAccountsApprovalApiService" id="transferAccountsApprovalApiService" timeout="6000" />
<!--我的套餐包-->
<dubbo:service interface="com.gic.enterprise.service.BillingEnterpriseSmsPackageApiService" ref="billingEnterpriseSmsPackageApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.BillingSmsRecordApiService" ref="billingSmsRecordApiService" timeout="6000" />
<!--明细报表-->
<dubbo:service interface="com.gic.enterprise.service.BillingRecordApiService" ref="billingRecordApiService" timeout="6000" />
<!-- 验证码 -->
<dubbo:reference interface="com.gic.auth.service.AuthCodeApiService" id="authCodeApiService" timeout="6000" />
<!--审核员-->
<dubbo:reference interface="com.gic.auth.service.AuditorApiService" id="auditorApiService" timeout="6000" />
<!-- 受审项目 -->
<dubbo:service interface="com.gic.enterprise.service.ProjectApiService" ref="projectApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.ProjectItemApiService" ref="projectItemApiService" timeout="6000" />
<!--微信回调-->
<dubbo:service interface="com.gic.enterprise.service.CallBackApiService" ref="callBackApiService" timeout="6000" />
<!--余额支付-->
<dubbo:service interface="com.gic.enterprise.service.BillingBalancePayApiService" ref="billingBalancePayApiService" timeout="6000" />
<!--服务订购-->
<dubbo:reference interface="com.gic.open.api.service.market.MarketUserApiService" id="marketUserApiService" timeout="6000" />
<dubbo:reference interface="com.gic.open.api.service.market.OrderPurchaseApiService" id="orderPurchaseApiService" timeout="6000" />
<dubbo:reference interface="com.gic.open.api.service.OrderApiService" id="orderApiService" timeout="6000" />
<dubbo:reference interface="com.gic.open.api.service.AppTokenApiService" id="appTokenApiService" timeout="6000" />
<!--分组-->
<dubbo:reference interface="com.gic.store.service.StoreGroupApiService" id="storeGroupApiService" timeout="6000" />
<!--数据安全-->
<dubbo:service interface="com.gic.enterprise.service.AuditLogApiService" ref="auditLogApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.RiskModeApiService" ref="riskModeApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.DownloadReportApiService" ref="downloadReportApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.DownloadLogApiService" ref="downloadLogApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.QrCodeApiService" ref="qrCodeApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.HelpCenterApiService" ref="helpCenterApiService" timeout="6000" />
<!--运维后台-->
<dubbo:reference interface="com.gic.authcenter.api.service.GicUserService" id="gicUserService" timeout="6000" />
<!--商户初始化调用-->
<dubbo:reference interface="com.gic.member.api.service.MemberInitApiService" id="memberInitApiService" timeout="6000" />
<!--首页配置-->
<dubbo:service interface="com.gic.enterprise.service.IndexModuleApiService" ref="indexModuleApiService" timeout="6000" />
<!--待办事项-->
<dubbo:service interface="com.gic.enterprise.service.TodoItemApiService" ref="todoItemApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.PushMessageApiService" ref="pushMessageApiService" timeout="6000" />
<!--自定义页面装修-->
<dubbo:service interface="com.gic.enterprise.service.AppletCustomPageApiService" ref="appletCustomPageApiService" timeout="6000" />
<!--链接小工具-->
<dubbo:service interface="com.gic.enterprise.service.LinkApiService" ref="linkApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.CustomGuideApiService" ref="customGuideApiService" timeout="6000" />
<!--小程序服务号-->
<dubbo:service interface="com.gic.enterprise.service.AppletServiceConfigApiService" ref="appletServiceConfigApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.AppletWechatMenuApiService" ref="appletWechatMenuApiService" timeout="6000" />
<dubbo:reference interface="com.gic.member.config.api.service.AppletsConfigApiService" id="appletsConfigApiService" timeout="6000" />
<dubbo:reference interface="com.gic.member.config.api.service.ServiceConfigApiService" id="serviceConfigApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.CustomThemeApiService" ref="customThemeApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.CustomStoreApiService" ref="customStoreApiService" timeout="6000" />
<dubbo:reference interface="com.gic.open.api.service.ServeApiService" id="serveApiService" timeout="60000" />
<!--小程序API管理-->
<dubbo:service interface="com.gic.enterprise.service.AppletAppApiService" ref="appletAppApiService" timeout="6000" />
<!--退款查询-->
<dubbo:service interface="com.gic.enterprise.service.BillingRefundApiService" ref="billingRefundApiService" timeout="6000" />
<!--明细-->
<dubbo:service interface="com.gic.enterprise.service.DoubleCallingApiService" ref="doubleCallingApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.InternationalSmsRecordApiService" ref="internationalSmsRecordApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.RecordingStorageRecordApiService" ref="recordingStorageRecordApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.VoiceCodeRecordApiService" ref="voiceCodeRecordApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.SmsRecordApiService" ref="smsRecordApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.AccountStandardApiService" ref="accountStandardApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.CustomUdeskFieldApiService" ref="customUdeskFieldApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.AppletDecorationConfigApiService" ref="appletDecorationConfigApiService" timeout="6000" />
<!--平台规则配置-->
<dubbo:service interface="com.gic.enterprise.service.ConfigRuleApiService" ref="configRuleApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.ConfigRuleEnterpriseApiService" ref="configRuleEnterpriseApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.WmStoreApiService" ref="wmStoreApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.DataConfigApiService" ref="dataConfigApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.AppletQrcodeApiService" ref="appletQrcodeApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.WmStoreSyncLogApiService" ref="wmStoreSyncLogApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.EnterpriseWhiteListApiService" ref="enterpriseWhiteListApiService" timeout="6000" />
<dubbo:reference interface="com.gic.mall.share.api.service.ShopApiService" id="shopApiService" timeout="6000" />
<dubbo:reference interface="com.gic.auth.service.BusinessFrontResApiService" id="businessFrontResApiService" timeout="6000" />
<dubbo:reference interface="com.gic.marketing.process.api.service.tmpl.WxTemplateRouterApiService" id="wxTemplateRouterApiService" timeout="60000" />
<dubbo:reference interface="com.gic.member.api.service.MemberUserApiService" id="memberUserApiService" timeout="60000" />
<dubbo:reference interface="com.gic.store.service.StoreApiService" id="storeApiService" timeout="60000" />
<dubbo:reference interface="com.gic.member.api.service.UserOwnerApiService" id="userOwnerApiService" timeout="60000" />
<dubbo:reference interface="com.gic.marketing.process.api.service.sms.SmsSendApiService" id="smsSendApiService" timeout="60000" />
<dubbo:reference interface="com.gic.wechat.business.api.service.wxa.WeixinWxaFunService" id="weixinWxaFunService" timeout="60000" />
<dubbo:reference interface="com.gic.weimob.api.service.WeimobMerchantService" id="weimobMerchantService" timeout="6000"/>
</beans> </beans>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<bean class="org.mybatis.spring.SqlSessionFactoryBean" id="sqlSessionFactory"> <bean class="org.mybatis.spring.SqlSessionFactoryBean" id="sqlSessionFactory">
<property name="dataSource" ref="dataSource"/> <property name="dataSource" ref="dataSource"/>
<property name="typeAliasesPackage" value="com.gic.enterprise.**.entity"/> <property name="typeAliasesPackage" value="com.gic.cloud.**.entity"/>
<property name="mapperLocations" value="classpath*:mapper/*.xml"/> <property name="mapperLocations" value="classpath*:mapper/*.xml"/>
<property name="plugins"> <property name="plugins">
<array> <array>
......
<?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.TabAppletCustomPageMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabAppletCustomPage">
<id column="page_id" jdbcType="INTEGER" property="pageId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="entry_condition" jdbcType="INTEGER" property="entryCondition" />
<result column="background_color" jdbcType="VARCHAR" property="backgroundColor" />
<result column="page_type" jdbcType="INTEGER" property="pageType" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="app_type" jdbcType="INTEGER" property="appType" />
<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>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.gic.enterprise.entity.TabAppletCustomPage">
<result column="setting" jdbcType="LONGVARCHAR" property="setting" />
</resultMap>
<sql id="Base_Column_List">
page_id, enterprise_id, title, entry_condition, background_color, page_type, status,
app_type, app_id, 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_custom_page
where page_id = #{pageId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_applet_custom_page
where page_id = #{pageId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabAppletCustomPage" useGeneratedKeys="true" keyProperty="pageId">
insert into tab_applet_custom_page (page_id, enterprise_id, title,
entry_condition, background_color, page_type, status, app_type,
app_id, create_time, update_time,
setting)
values (#{pageId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR},
#{entryCondition,jdbcType=INTEGER}, #{backgroundColor,jdbcType=VARCHAR}, #{pageType,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{appType,jdbcType=INTEGER},
#{appId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{setting,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabAppletCustomPage">
insert into tab_applet_custom_page
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="pageId != null">
page_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="title != null">
title,
</if>
<if test="entryCondition != null">
entry_condition,
</if>
<if test="backgroundColor != null">
background_color,
</if>
<if test="pageType != null">
page_type,
</if>
<if test="status != null">
status,
</if>
<if test="appType != null">
app_type,
</if>
<if test="appId != null">
app_id,
</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="pageId != null">
#{pageId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="entryCondition != null">
#{entryCondition,jdbcType=INTEGER},
</if>
<if test="backgroundColor != null">
#{backgroundColor,jdbcType=VARCHAR},
</if>
<if test="pageType != null">
#{pageType,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="appType != null">
#{appType,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>
<if test="setting != null">
#{setting,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabAppletCustomPage">
update tab_applet_custom_page
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="entryCondition != null">
entry_condition = #{entryCondition,jdbcType=INTEGER},
</if>
<if test="backgroundColor != null">
background_color = #{backgroundColor,jdbcType=VARCHAR},
</if>
<if test="pageType != null">
page_type = #{pageType,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="appType != null">
app_type = #{appType,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>
<if test="setting != null">
setting = #{setting,jdbcType=LONGVARCHAR},
</if>
</set>
where page_id = #{pageId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.gic.enterprise.entity.TabAppletCustomPage">
update tab_applet_custom_page
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
title = #{title,jdbcType=VARCHAR},
entry_condition = #{entryCondition,jdbcType=INTEGER},
background_color = #{backgroundColor,jdbcType=VARCHAR},
page_type = #{pageType,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
app_type = #{appType,jdbcType=INTEGER},
app_id = #{appId,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
setting = #{setting,jdbcType=LONGVARCHAR}
where page_id = #{pageId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabAppletCustomPage">
update tab_applet_custom_page
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
title = #{title,jdbcType=VARCHAR},
entry_condition = #{entryCondition,jdbcType=INTEGER},
background_color = #{backgroundColor,jdbcType=VARCHAR},
page_type = #{pageType,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
app_type = #{appType,jdbcType=INTEGER},
app_id = #{appId,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where page_id = #{pageId,jdbcType=INTEGER}
</update>
<select id="listByParams" resultMap="BaseResultMap" parameterType="com.gic.enterprise.qo.AppletPageQO">
select <include refid="Base_Column_List"></include>
from tab_applet_custom_page
where status between 1 and 2
<if test="search != null and search != '' ">
and title like concat('%', #{search}, '%')
</if>
<if test="appType != null">
and app_type = #{appType}
</if>
<if test="enterpriseId != null">
and enterprise_id = #{enterpriseId}
</if>
<if test="appId != null and appId != '' ">
and app_id = #{appId}
</if>
<if test="pageType != null">
and page_type = #{pageType}
</if>
<if test="orderByStr != null and orderByStr != '' ">
${orderByStr}
</if>
<if test="orderByStr == null or orderByStr == ''">
order by status , update_time desc
</if>
</select>
<update id="disableFetch">
update tab_applet_custom_page set status = 2
where status = 1
and enterprise_id = #{enterpriseId}
and app_id = #{appId}
and page_type = #{pageType}
and app_type = #{appType}
</update>
<select id="listEnablePage" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_applet_custom_page
where status = 1
and enterprise_id = #{enterpriseId}
and app_id = #{appId}
and page_type = #{pageType}
and app_type = #{appType}
</select>
<select id="count" resultType="int">
select count(1) from tab_applet_custom_page
where enterprise_id = #{enterpriseId}
and app_id = #{appId}
and page_type = #{pageType}
and app_type = #{appType}
and status != 0
</select>
<select id="getDefault" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_applet_custom_page
where status = 1
and enterprise_id = -1
and page_type = #{pageType}
</select>
<update id="deleteFetch">
update tab_applet_custom_page set status = 0
where page_id in
<foreach collection="list" item="item" separator="," open="(" close=")" index="">
#{item}
</foreach>
</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.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.TabAuditLogMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabAuditLog">
<id column="audit_log_id" jdbcType="INTEGER" property="auditLogId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="apply_user_id" jdbcType="INTEGER" property="applyUserId" />
<result column="apply_user_name" jdbcType="VARCHAR" property="applyUserName" />
<result column="apply_time" jdbcType="TIMESTAMP" property="applyTime" />
<result column="project_item_id" jdbcType="INTEGER" property="projectItemId" />
<result column="project_item_name" jdbcType="VARCHAR" property="projectItemName" />
<result column="auditor_id" jdbcType="INTEGER" property="auditorId" />
<result column="auditor_name" jdbcType="VARCHAR" property="auditorName" />
<result column="auditor_phone" jdbcType="VARCHAR" property="auditorPhone" />
<result column="audit_time" jdbcType="TIMESTAMP" property="auditTime" />
<result column="audit_result" jdbcType="INTEGER" property="auditResult" />
<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="extra_info" jdbcType="VARCHAR" property="extraInfo" />
<result column="audit_reason" jdbcType="VARCHAR" property="auditReason" />
<result column="audit_type" jdbcType="INTEGER" property="auditType" />
<result column="audit_expire_time" jdbcType="TIMESTAMP" property="auditExpireTime" />
</resultMap>
<sql id="Base_Column_List">
audit_log_id, enterprise_id, apply_user_id, apply_user_name, apply_time, project_item_id,
project_item_name, auditor_id, auditor_name, auditor_phone, audit_time, audit_result,
status, create_time, update_time, extra_info, audit_reason, audit_type, audit_expire_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_audit_log
where audit_log_id = #{auditLogId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_audit_log
where audit_log_id = #{auditLogId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabAuditLog">
insert into tab_audit_log (audit_log_id, enterprise_id, apply_user_id,
apply_user_name, apply_time, project_item_id,
project_item_name, auditor_id, auditor_name,
auditor_phone, audit_time, audit_result,
status, create_time, update_time,
extra_info, audit_reason, audit_type,
audit_expire_time)
values (#{auditLogId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{applyUserId,jdbcType=INTEGER},
#{applyUserName,jdbcType=VARCHAR}, #{applyTime,jdbcType=TIMESTAMP}, #{projectItemId,jdbcType=INTEGER},
#{projectItemName,jdbcType=VARCHAR}, #{auditorId,jdbcType=INTEGER}, #{auditorName,jdbcType=VARCHAR},
#{auditorPhone,jdbcType=VARCHAR}, #{auditTime,jdbcType=TIMESTAMP}, #{auditResult,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{extraInfo,jdbcType=VARCHAR}, #{auditReason,jdbcType=VARCHAR}, #{auditType,jdbcType=INTEGER},
#{auditExpireTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabAuditLog">
<selectKey keyProperty="auditLogId" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_audit_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="auditLogId != null">
audit_log_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="applyUserId != null">
apply_user_id,
</if>
<if test="applyUserName != null">
apply_user_name,
</if>
<if test="applyTime != null">
apply_time,
</if>
<if test="projectItemId != null">
project_item_id,
</if>
<if test="projectItemName != null">
project_item_name,
</if>
<if test="auditorId != null">
auditor_id,
</if>
<if test="auditorName != null">
auditor_name,
</if>
<if test="auditorPhone != null">
auditor_phone,
</if>
<if test="auditTime != null">
audit_time,
</if>
<if test="auditResult != null">
audit_result,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="extraInfo != null">
extra_info,
</if>
<if test="auditReason != null">
audit_reason,
</if>
<if test="auditType != null">
audit_type,
</if>
<if test="auditExpireTime != null">
audit_expire_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="auditLogId != null">
#{auditLogId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="applyUserId != null">
#{applyUserId,jdbcType=INTEGER},
</if>
<if test="applyUserName != null">
#{applyUserName,jdbcType=VARCHAR},
</if>
<if test="applyTime != null">
#{applyTime,jdbcType=TIMESTAMP},
</if>
<if test="projectItemId != null">
#{projectItemId,jdbcType=INTEGER},
</if>
<if test="projectItemName != null">
#{projectItemName,jdbcType=VARCHAR},
</if>
<if test="auditorId != null">
#{auditorId,jdbcType=INTEGER},
</if>
<if test="auditorName != null">
#{auditorName,jdbcType=VARCHAR},
</if>
<if test="auditorPhone != null">
#{auditorPhone,jdbcType=VARCHAR},
</if>
<if test="auditTime != null">
#{auditTime,jdbcType=TIMESTAMP},
</if>
<if test="auditResult != null">
#{auditResult,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="extraInfo != null">
#{extraInfo,jdbcType=VARCHAR},
</if>
<if test="auditReason != null">
#{auditReason,jdbcType=VARCHAR},
</if>
<if test="auditType != null">
#{auditType,jdbcType=INTEGER},
</if>
<if test="auditExpireTime != null">
#{auditExpireTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabAuditLog">
update tab_audit_log
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="applyUserId != null">
apply_user_id = #{applyUserId,jdbcType=INTEGER},
</if>
<if test="applyUserName != null">
apply_user_name = #{applyUserName,jdbcType=VARCHAR},
</if>
<if test="applyTime != null">
apply_time = #{applyTime,jdbcType=TIMESTAMP},
</if>
<if test="projectItemId != null">
project_item_id = #{projectItemId,jdbcType=INTEGER},
</if>
<if test="projectItemName != null">
project_item_name = #{projectItemName,jdbcType=VARCHAR},
</if>
<if test="auditorId != null">
auditor_id = #{auditorId,jdbcType=INTEGER},
</if>
<if test="auditorName != null">
auditor_name = #{auditorName,jdbcType=VARCHAR},
</if>
<if test="auditorPhone != null">
auditor_phone = #{auditorPhone,jdbcType=VARCHAR},
</if>
<if test="auditTime != null">
audit_time = #{auditTime,jdbcType=TIMESTAMP},
</if>
<if test="auditResult != null">
audit_result = #{auditResult,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="extraInfo != null">
extra_info = #{extraInfo,jdbcType=VARCHAR},
</if>
<if test="auditReason != null">
audit_reason = #{auditReason,jdbcType=VARCHAR},
</if>
<if test="auditType != null">
audit_type = #{auditType,jdbcType=INTEGER},
</if>
<if test="auditExpireTime != null">
audit_expire_time = #{auditExpireTime,jdbcType=TIMESTAMP},
</if>
</set>
where audit_log_id = #{auditLogId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabAuditLog">
update tab_audit_log
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
apply_user_id = #{applyUserId,jdbcType=INTEGER},
apply_user_name = #{applyUserName,jdbcType=VARCHAR},
apply_time = #{applyTime,jdbcType=TIMESTAMP},
project_item_id = #{projectItemId,jdbcType=INTEGER},
project_item_name = #{projectItemName,jdbcType=VARCHAR},
auditor_id = #{auditorId,jdbcType=INTEGER},
auditor_name = #{auditorName,jdbcType=VARCHAR},
auditor_phone = #{auditorPhone,jdbcType=VARCHAR},
audit_time = #{auditTime,jdbcType=TIMESTAMP},
audit_result = #{auditResult,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
extra_info = #{extraInfo,jdbcType=VARCHAR},
audit_reason = #{auditReason,jdbcType=VARCHAR},
audit_type = #{auditType,jdbcType=INTEGER},
audit_expire_time = #{auditExpireTime,jdbcType=TIMESTAMP}
where audit_log_id = #{auditLogId,jdbcType=INTEGER}
</update>
<select id="getLastWaitAuditByApplyUser" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_audit_log
where status = 1
and audit_result = 0
-- and audit_expire_time &lt; #{auditExpireTime}
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="applyUserId != null ">
and apply_user_id = #{applyUserId}
</if>
<if test="projectItemId != null ">
and project_item_id = #{projectItemId}
</if>
order by apply_time desc
limit 1
</select>
<select id="listAuditLog" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_audit_log
where status = 1
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="startTime != null ">
and apply_time &gt;= #{startTime}
</if>
<if test="endTime != null ">
and apply_time &lt;= #{endTime}
</if>
<if test="search != null and search != '' ">
and ( apply_user_id like concat('%', #{search},'%')
or project_item_name like concat('%', #{search},'%')
or auditor_name like concat('%', #{search},'%')
or auditor_phone like concat('%', #{search},'%')
)
</if>
order by create_time desc
</select>
<select id="getWaitAuditByProjectItem" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_audit_log
where status = 1
and audit_type = 1
and audit_expire_time &lt; #{auditExpireTime}
and project_item_id = #{projectItemId}
</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.TabBillingAccountBalanceRecordMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabBillingAccountBalanceRecord">
<id column="account_balance_record_id" jdbcType="INTEGER" property="accountBalanceRecordId" />
<result column="product_name" jdbcType="VARCHAR" property="productName" />
<result column="pay_type" jdbcType="INTEGER" property="payType" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="product_type" jdbcType="INTEGER" property="productType" />
<result column="bill_type" jdbcType="INTEGER" property="billType" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="order_id" jdbcType="INTEGER" property="orderId" />
<result column="deduction_time" jdbcType="TIMESTAMP" property="deductionTime" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="order_serial_number" jdbcType="VARCHAR" property="orderSerialNumber" />
<result column="request_code" jdbcType="VARCHAR" property="requestCode" />
<result column="fee" jdbcType="DOUBLE" property="fee" />
<result column="fee_paid" jdbcType="DOUBLE" property="feePaid" />
<result column="fee_discount" jdbcType="DOUBLE" property="feeDiscount" />
<result column="operator_id" jdbcType="INTEGER" property="operatorId" />
<result column="operator_name" jdbcType="VARCHAR" property="operatorName" />
</resultMap>
<sql id="Base_Column_List">
account_balance_record_id, product_name, pay_type, status, product_type, bill_type,
create_time, order_id, deduction_time, enterprise_id, order_serial_number, request_code,
fee, fee_paid, fee_discount, operator_id, operator_name
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_account_balance_record
where account_balance_record_id = #{accountBalanceRecordId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_billing_account_balance_record
where account_balance_record_id = #{accountBalanceRecordId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingAccountBalanceRecord">
insert into tab_billing_account_balance_record (account_balance_record_id, product_name,
pay_type, status, product_type,
bill_type, create_time, order_id,
deduction_time, enterprise_id, order_serial_number,
request_code, fee, fee_paid,
fee_discount, operator_id, operator_name
)
values (#{accountBalanceRecordId,jdbcType=INTEGER}, #{productName,jdbcType=VARCHAR},
#{payType,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{productType,jdbcType=INTEGER},
#{billType,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{orderId,jdbcType=INTEGER},
#{deductionTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=INTEGER}, #{orderSerialNumber,jdbcType=VARCHAR},
#{requestCode,jdbcType=VARCHAR}, #{fee,jdbcType=DOUBLE}, #{feePaid,jdbcType=DOUBLE},
#{feeDiscount,jdbcType=DOUBLE}, #{operatorId,jdbcType=INTEGER}, #{operatorName,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingAccountBalanceRecord">
insert into tab_billing_account_balance_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="accountBalanceRecordId != null">
account_balance_record_id,
</if>
<if test="productName != null">
product_name,
</if>
<if test="payType != null">
pay_type,
</if>
<if test="status != null">
status,
</if>
<if test="productType != null">
product_type,
</if>
<if test="billType != null">
bill_type,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="orderId != null">
order_id,
</if>
<if test="deductionTime != null">
deduction_time,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="orderSerialNumber != null">
order_serial_number,
</if>
<if test="requestCode != null">
request_code,
</if>
<if test="fee != null">
fee,
</if>
<if test="feePaid != null">
fee_paid,
</if>
<if test="feeDiscount != null">
fee_discount,
</if>
<if test="operatorId != null">
operator_id,
</if>
<if test="operatorName != null">
operator_name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="accountBalanceRecordId != null">
#{accountBalanceRecordId,jdbcType=INTEGER},
</if>
<if test="productName != null">
#{productName,jdbcType=VARCHAR},
</if>
<if test="payType != null">
#{payType,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="productType != null">
#{productType,jdbcType=INTEGER},
</if>
<if test="billType != null">
#{billType,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="orderId != null">
#{orderId,jdbcType=INTEGER},
</if>
<if test="deductionTime != null">
#{deductionTime,jdbcType=TIMESTAMP},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="orderSerialNumber != null">
#{orderSerialNumber,jdbcType=VARCHAR},
</if>
<if test="requestCode != null">
#{requestCode,jdbcType=VARCHAR},
</if>
<if test="fee != null">
#{fee,jdbcType=DOUBLE},
</if>
<if test="feePaid != null">
#{feePaid,jdbcType=DOUBLE},
</if>
<if test="feeDiscount != null">
#{feeDiscount,jdbcType=DOUBLE},
</if>
<if test="operatorId != null">
#{operatorId,jdbcType=INTEGER},
</if>
<if test="operatorName != null">
#{operatorName,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingAccountBalanceRecord">
update tab_billing_account_balance_record
<set>
<if test="productName != null">
product_name = #{productName,jdbcType=VARCHAR},
</if>
<if test="payType != null">
pay_type = #{payType,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="productType != null">
product_type = #{productType,jdbcType=INTEGER},
</if>
<if test="billType != null">
bill_type = #{billType,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="orderId != null">
order_id = #{orderId,jdbcType=INTEGER},
</if>
<if test="deductionTime != null">
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="orderSerialNumber != null">
order_serial_number = #{orderSerialNumber,jdbcType=VARCHAR},
</if>
<if test="requestCode != null">
request_code = #{requestCode,jdbcType=VARCHAR},
</if>
<if test="fee != null">
fee = #{fee,jdbcType=DOUBLE},
</if>
<if test="feePaid != null">
fee_paid = #{feePaid,jdbcType=DOUBLE},
</if>
<if test="feeDiscount != null">
fee_discount = #{feeDiscount,jdbcType=DOUBLE},
</if>
<if test="operatorId != null">
operator_id = #{operatorId,jdbcType=INTEGER},
</if>
<if test="operatorName != null">
operator_name = #{operatorName,jdbcType=VARCHAR},
</if>
</set>
where account_balance_record_id = #{accountBalanceRecordId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabBillingAccountBalanceRecord">
update tab_billing_account_balance_record
set product_name = #{productName,jdbcType=VARCHAR},
pay_type = #{payType,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
product_type = #{productType,jdbcType=INTEGER},
bill_type = #{billType,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
order_id = #{orderId,jdbcType=INTEGER},
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
order_serial_number = #{orderSerialNumber,jdbcType=VARCHAR},
request_code = #{requestCode,jdbcType=VARCHAR},
fee = #{fee,jdbcType=DOUBLE},
fee_paid = #{feePaid,jdbcType=DOUBLE},
fee_discount = #{feeDiscount,jdbcType=DOUBLE},
operator_id = #{operatorId,jdbcType=INTEGER},
operator_name = #{operatorName,jdbcType=VARCHAR}
where account_balance_record_id = #{accountBalanceRecordId,jdbcType=INTEGER}
</update>
<select id="listHomeStatistics" parameterType="com.gic.enterprise.qo.HomeStatisticsQO" resultType="com.gic.enterprise.dto.HomeStatisticsDTO">
select
DATE_FORMAT(deduction_time,'%Y-%m-%d') statisticsDate,
ifnull(sum(fee), 0) fee
from tab_billing_account_balance_record
where status = 1
and enterprise_id = #{enterpriseId}
<if test="startTime != null">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
group by statisticsDate
</select>
<select id="getFee" resultType="double">
select
ifnull(sum(fee), 0)
from tab_billing_account_balance_record
where status = 1
and enterprise_id = #{enterpriseId}
<if test="dateType == 1 ">
and date_format(deduction_time,'%Y-%m') = date_format(now(),'%Y-%m')
</if>
<if test="dateType == 2">
and date_format(deduction_time,'%Y-%m') = date_format(DATE_SUB(curdate(), INTERVAL 1 MONTH),'%Y-%m')
</if>
</select>
<select id="getTotalFee" resultType="double">
select
ifnull(sum(fee), 0)
from tab_billing_account_balance_record
where status = 1
and enterprise_id = #{enterpriseId}
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
</select>
<select id="listAccountBalanceRecord" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_account_balance_record
<where>
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
<if test="productName != null and productName != '' ">
and product_name like concat('%', #{productName}, '%')
</if>
</where>
order by deduction_time desc
</select>
<select id="countAccountBalanceRecord" resultType="int">
select
count(*)
from tab_billing_account_balance_record
<where>
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
<if test="productName != null and productName != '' ">
and product_name like concat('%', #{productName}, '%')
</if>
</where>
</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.TabBillingDoubleCallingRecordMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabBillingDoubleCallingRecord">
<id column="double_calling_record_id" jdbcType="INTEGER" property="doubleCallingRecordId" />
<result column="pay_serial_number" jdbcType="VARCHAR" property="paySerialNumber" />
<result column="caller_name" jdbcType="VARCHAR" property="callerName" />
<result column="caller_phone" jdbcType="VARCHAR" property="callerPhone" />
<result column="fee" jdbcType="DOUBLE" property="fee" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="deduction_time" jdbcType="TIMESTAMP" property="deductionTime" />
<result column="called_id" jdbcType="BIGINT" property="calledId" />
<result column="called_name" jdbcType="VARCHAR" property="calledName" />
<result column="called_phone" jdbcType="VARCHAR" property="calledPhone" />
<result column="unit_fee" jdbcType="DOUBLE" property="unitFee" />
<result column="app_code" jdbcType="VARCHAR" property="appCode" />
<result column="app_name" jdbcType="VARCHAR" property="appName" />
<result column="voice_time" jdbcType="VARCHAR" property="voiceTime" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="store_id" jdbcType="INTEGER" property="storeId" />
<result column="store_name" jdbcType="VARCHAR" property="storeName" />
<result column="store_group_id" jdbcType="INTEGER" property="storeGroupId" />
<result column="store_group_name" jdbcType="VARCHAR" property="storeGroupName" />
<result column="call_time" jdbcType="TIMESTAMP" property="callTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Base_Column_List">
double_calling_record_id, pay_serial_number, caller_name, caller_phone, fee, status,
create_time, deduction_time, called_id, called_name, called_phone, unit_fee, app_code,
app_name, voice_time, enterprise_id, store_id, store_name, store_group_id, store_group_name,
call_time, remark
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_double_calling_record
where double_calling_record_id = #{doubleCallingRecordId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_billing_double_calling_record
where double_calling_record_id = #{doubleCallingRecordId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingDoubleCallingRecord">
insert into tab_billing_double_calling_record (double_calling_record_id, pay_serial_number,
caller_name, caller_phone, fee,
status, create_time, deduction_time,
called_id, called_name, called_phone,
unit_fee, app_code, app_name,
voice_time, enterprise_id, store_id,
store_name, store_group_id, store_group_name,
call_time, remark)
values (#{doubleCallingRecordId,jdbcType=INTEGER}, #{paySerialNumber,jdbcType=VARCHAR},
#{callerName,jdbcType=VARCHAR}, #{callerPhone,jdbcType=VARCHAR}, #{fee,jdbcType=DOUBLE},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{deductionTime,jdbcType=TIMESTAMP},
#{calledId,jdbcType=BIGINT}, #{calledName,jdbcType=VARCHAR}, #{calledPhone,jdbcType=VARCHAR},
#{unitFee,jdbcType=DOUBLE}, #{appCode,jdbcType=VARCHAR}, #{appName,jdbcType=VARCHAR},
#{voiceTime,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=INTEGER}, #{storeId,jdbcType=INTEGER},
#{storeName,jdbcType=VARCHAR}, #{storeGroupId,jdbcType=INTEGER}, #{storeGroupName,jdbcType=VARCHAR},
#{callTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingDoubleCallingRecord">
insert into tab_billing_double_calling_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="doubleCallingRecordId != null">
double_calling_record_id,
</if>
<if test="paySerialNumber != null">
pay_serial_number,
</if>
<if test="callerName != null">
caller_name,
</if>
<if test="callerPhone != null">
caller_phone,
</if>
<if test="fee != null">
fee,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="deductionTime != null">
deduction_time,
</if>
<if test="calledId != null">
called_id,
</if>
<if test="calledName != null">
called_name,
</if>
<if test="calledPhone != null">
called_phone,
</if>
<if test="unitFee != null">
unit_fee,
</if>
<if test="appCode != null">
app_code,
</if>
<if test="appName != null">
app_name,
</if>
<if test="voiceTime != null">
voice_time,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="storeId != null">
store_id,
</if>
<if test="storeName != null">
store_name,
</if>
<if test="storeGroupId != null">
store_group_id,
</if>
<if test="storeGroupName != null">
store_group_name,
</if>
<if test="callTime != null">
call_time,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="doubleCallingRecordId != null">
#{doubleCallingRecordId,jdbcType=INTEGER},
</if>
<if test="paySerialNumber != null">
#{paySerialNumber,jdbcType=VARCHAR},
</if>
<if test="callerName != null">
#{callerName,jdbcType=VARCHAR},
</if>
<if test="callerPhone != null">
#{callerPhone,jdbcType=VARCHAR},
</if>
<if test="fee != null">
#{fee,jdbcType=DOUBLE},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="deductionTime != null">
#{deductionTime,jdbcType=TIMESTAMP},
</if>
<if test="calledId != null">
#{calledId,jdbcType=BIGINT},
</if>
<if test="calledName != null">
#{calledName,jdbcType=VARCHAR},
</if>
<if test="calledPhone != null">
#{calledPhone,jdbcType=VARCHAR},
</if>
<if test="unitFee != null">
#{unitFee,jdbcType=DOUBLE},
</if>
<if test="appCode != null">
#{appCode,jdbcType=VARCHAR},
</if>
<if test="appName != null">
#{appName,jdbcType=VARCHAR},
</if>
<if test="voiceTime != null">
#{voiceTime,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="storeId != null">
#{storeId,jdbcType=INTEGER},
</if>
<if test="storeName != null">
#{storeName,jdbcType=VARCHAR},
</if>
<if test="storeGroupId != null">
#{storeGroupId,jdbcType=INTEGER},
</if>
<if test="storeGroupName != null">
#{storeGroupName,jdbcType=VARCHAR},
</if>
<if test="callTime != null">
#{callTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingDoubleCallingRecord">
update tab_billing_double_calling_record
<set>
<if test="paySerialNumber != null">
pay_serial_number = #{paySerialNumber,jdbcType=VARCHAR},
</if>
<if test="callerName != null">
caller_name = #{callerName,jdbcType=VARCHAR},
</if>
<if test="callerPhone != null">
caller_phone = #{callerPhone,jdbcType=VARCHAR},
</if>
<if test="fee != null">
fee = #{fee,jdbcType=DOUBLE},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="deductionTime != null">
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
</if>
<if test="calledId != null">
called_id = #{calledId,jdbcType=BIGINT},
</if>
<if test="calledName != null">
called_name = #{calledName,jdbcType=VARCHAR},
</if>
<if test="calledPhone != null">
called_phone = #{calledPhone,jdbcType=VARCHAR},
</if>
<if test="unitFee != null">
unit_fee = #{unitFee,jdbcType=DOUBLE},
</if>
<if test="appCode != null">
app_code = #{appCode,jdbcType=VARCHAR},
</if>
<if test="appName != null">
app_name = #{appName,jdbcType=VARCHAR},
</if>
<if test="voiceTime != null">
voice_time = #{voiceTime,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="storeId != null">
store_id = #{storeId,jdbcType=INTEGER},
</if>
<if test="storeName != null">
store_name = #{storeName,jdbcType=VARCHAR},
</if>
<if test="storeGroupId != null">
store_group_id = #{storeGroupId,jdbcType=INTEGER},
</if>
<if test="storeGroupName != null">
store_group_name = #{storeGroupName,jdbcType=VARCHAR},
</if>
<if test="callTime != null">
call_time = #{callTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where double_calling_record_id = #{doubleCallingRecordId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabBillingDoubleCallingRecord">
update tab_billing_double_calling_record
set pay_serial_number = #{paySerialNumber,jdbcType=VARCHAR},
caller_name = #{callerName,jdbcType=VARCHAR},
caller_phone = #{callerPhone,jdbcType=VARCHAR},
fee = #{fee,jdbcType=DOUBLE},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
called_id = #{calledId,jdbcType=BIGINT},
called_name = #{calledName,jdbcType=VARCHAR},
called_phone = #{calledPhone,jdbcType=VARCHAR},
unit_fee = #{unitFee,jdbcType=DOUBLE},
app_code = #{appCode,jdbcType=VARCHAR},
app_name = #{appName,jdbcType=VARCHAR},
voice_time = #{voiceTime,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
store_id = #{storeId,jdbcType=INTEGER},
store_name = #{storeName,jdbcType=VARCHAR},
store_group_id = #{storeGroupId,jdbcType=INTEGER},
store_group_name = #{storeGroupName,jdbcType=VARCHAR},
call_time = #{callTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR}
where double_calling_record_id = #{doubleCallingRecordId,jdbcType=INTEGER}
</update>
<select id="listHomeStatistics" parameterType="com.gic.enterprise.qo.HomeStatisticsQO" resultType="com.gic.enterprise.dto.HomeStatisticsDTO">
select
DATE_FORMAT(deduction_time,'%Y-%m-%d') statisticsDate,
ifnull(sum(fee), 0) fee
from tab_billing_double_calling_record
where status = 1
and enterprise_id = #{enterpriseId}
<if test="startTime != null">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
group by statisticsDate
</select>
<select id="getFee" resultType="double">
select
ifnull(sum(fee), 0)
from tab_billing_double_calling_record
where status = 1
and enterprise_id = #{enterpriseId}
<if test="dateType == 1 ">
and date_format(deduction_time,'%Y-%m') = date_format(now(),'%Y-%m')
</if>
<if test="dateType == 2">
and date_format(deduction_time,'%Y-%m') = date_format(DATE_SUB(curdate(), INTERVAL 1 MONTH),'%Y-%m')
</if>
</select>
<select id="getTotalFee" resultType="double">
select
ifnull(sum(fee), 0)
from tab_billing_double_calling_record
where status = 1
and enterprise_id = #{enterpriseId}
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
</select>
<select id="listDoubleCallingRecord" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_double_calling_record
<where>
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
<if test="phone != null and phone != '' ">
and ( caller_phone like concat('%', #{phone}, '%') or called_phone like concat('%', #{phone}, '%') )
</if>
</where>
order by create_time desc
</select>
<select id="countDoubleCallingRecord" resultType="int">
select
count(*)
from tab_billing_double_calling_record
<where>
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
<if test="phone != null and phone != '' ">
and ( caller_phone like concat('%', #{phone}, '%') or called_phone like concat('%', #{phone}, '%') )
</if>
</where>
</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.TabBillingEnterpriseSmsPackageMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabBillingEnterpriseSmsPackage">
<id column="enterprise_sms_package_id" jdbcType="INTEGER" property="enterpriseSmsPackageId" />
<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="sms_package_name" jdbcType="VARCHAR" property="smsPackageName" />
<result column="sms_package_code" jdbcType="VARCHAR" property="smsPackageCode" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="effective_date" jdbcType="DATE" property="effectiveDate" />
<result column="billing_order_id" jdbcType="INTEGER" property="billingOrderId" />
<result column="total_acount" jdbcType="INTEGER" property="totalAcount" />
<result column="remain_account" jdbcType="INTEGER" property="remainAccount" />
</resultMap>
<sql id="Base_Column_List">
enterprise_sms_package_id, enterprise_id, status, create_time, update_time, sms_package_name,
sms_package_code, type, effective_date, billing_order_id, total_acount, remain_account
</sql>
<sql id="list1">
select
<include refid="Base_Column_List" />
from tab_billing_enterprise_sms_package
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
and status = 2
<if test="startDate != null and startDate != ''">
and effective_date &gt;= #{startDate}
</if>
<if test="endDate != null and endDate != ''">
and effective_date &lt;= #{endDate}
</if>
<if test="search !=null and search !=''">
and sms_package_name like concat('%',#{search},'%')
</if>
order by status, create_time desc
limit #{totalCount}
</sql>
<sql id="list2">
select
<include refid="Base_Column_List" />
from tab_billing_enterprise_sms_package
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
and status !=0
<if test="startDate != null and startDate != ''">
and effective_date &gt;= #{startDate}
</if>
<if test="endDate != null and endDate != ''">
and effective_date &lt;= #{endDate}
</if>
<if test="search !=null and search !=''">
and sms_package_name like concat('%',#{search},'%')
</if>
order by status, create_time desc
limit #{totalCount}
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_enterprise_sms_package
where enterprise_sms_package_id = #{enterpriseSmsPackageId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_billing_enterprise_sms_package
where enterprise_sms_package_id = #{enterpriseSmsPackageId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingEnterpriseSmsPackage">
insert into tab_billing_enterprise_sms_package (enterprise_sms_package_id, enterprise_id,
status, create_time, update_time,
sms_package_name, sms_package_code, type,
effective_date, billing_order_id, total_acount,
remain_account)
values (#{enterpriseSmsPackageId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{smsPackageName,jdbcType=VARCHAR}, #{smsPackageCode,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER},
#{effectiveDate,jdbcType=DATE}, #{billingOrderId,jdbcType=INTEGER}, #{totalAcount,jdbcType=INTEGER},
#{remainAccount,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingEnterpriseSmsPackage">
insert into tab_billing_enterprise_sms_package
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseSmsPackageId != null">
enterprise_sms_package_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="smsPackageName != null">
sms_package_name,
</if>
<if test="smsPackageCode != null">
sms_package_code,
</if>
<if test="type != null">
type,
</if>
<if test="effectiveDate != null">
effective_date,
</if>
<if test="billingOrderId != null">
billing_order_id,
</if>
<if test="totalAcount != null">
total_acount,
</if>
<if test="remainAccount != null">
remain_account,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseSmsPackageId != null">
#{enterpriseSmsPackageId,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="smsPackageName != null">
#{smsPackageName,jdbcType=VARCHAR},
</if>
<if test="smsPackageCode != null">
#{smsPackageCode,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="effectiveDate != null">
#{effectiveDate,jdbcType=DATE},
</if>
<if test="billingOrderId != null">
#{billingOrderId,jdbcType=INTEGER},
</if>
<if test="totalAcount != null">
#{totalAcount,jdbcType=INTEGER},
</if>
<if test="remainAccount != null">
#{remainAccount,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingEnterpriseSmsPackage">
update tab_billing_enterprise_sms_package
<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="smsPackageName != null">
sms_package_name = #{smsPackageName,jdbcType=VARCHAR},
</if>
<if test="smsPackageCode != null">
sms_package_code = #{smsPackageCode,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="effectiveDate != null">
effective_date = #{effectiveDate,jdbcType=DATE},
</if>
<if test="billingOrderId != null">
billing_order_id = #{billingOrderId,jdbcType=INTEGER},
</if>
<if test="totalAcount != null">
total_acount = #{totalAcount,jdbcType=INTEGER},
</if>
<if test="remainAccount != null">
remain_account = #{remainAccount,jdbcType=INTEGER},
</if>
</set>
where enterprise_sms_package_id = #{enterpriseSmsPackageId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabBillingEnterpriseSmsPackage">
update tab_billing_enterprise_sms_package
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
sms_package_name = #{smsPackageName,jdbcType=VARCHAR},
sms_package_code = #{smsPackageCode,jdbcType=VARCHAR},
type = #{type,jdbcType=INTEGER},
effective_date = #{effectiveDate,jdbcType=DATE},
billing_order_id = #{billingOrderId,jdbcType=INTEGER},
total_acount = #{totalAcount,jdbcType=INTEGER},
remain_account = #{remainAccount,jdbcType=INTEGER}
where enterprise_sms_package_id = #{enterpriseSmsPackageId,jdbcType=INTEGER}
</update>
<select id="listEnterpriseSmsPackage" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_enterprise_sms_package
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
<if test="status == null">
and status !=0
</if>
<if test="status != null">
and status=#{status}
</if>
<if test="startDate != null and startDate != ''">
and effective_date &gt;= #{startDate}
</if>
<if test="endDate != null and endDate != ''">
and effective_date &lt;= #{endDate}
</if>
<if test="search !=null and search !=''">
and sms_package_name like concat('%',#{search},'%')
</if>
order by create_time desc
</select>
<select id="listEnterpriseSmsPackageNoStatus" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from
(
(<include refid="list1"/>)
union
(<include refid="list2"/>)
) t1
</select>
<select id="listSmsPackage" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_enterprise_sms_package
where enterprise_id = #{enterpriseId}
and status !=0
and `type` = 1
</select>
<select id="getEarliest" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_enterprise_sms_package
where enterprise_id = #{enterpriseId}
and status in (1, 2)
order by create_time
limit 1
</select>
<update id="deduct">
update tab_billing_enterprise_sms_package set remain_account = remain_account - 1 where enterprise_sms_package_id = #{enterpriseSmsPackageId} and remain_account > 0
</update>
<select id="getTotalSmsInPackageByEnterpriseId" resultType="int">
select
sum(remain_account)
from tab_billing_enterprise_sms_package
where enterprise_id = #{enterpriseId}
and status in (1, 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.TabBillingInternationalSmsRecordMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabBillingInternationalSmsRecord">
<id column="sms_record_id" jdbcType="BIGINT" property="smsRecordId" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="send_time" jdbcType="TIMESTAMP" property="sendTime" />
<result column="receive_phone" jdbcType="VARCHAR" property="receivePhone" />
<result column="pay_type" jdbcType="INTEGER" property="payType" />
<result column="app_code" jdbcType="VARCHAR" property="appCode" />
<result column="app_name" jdbcType="VARCHAR" property="appName" />
<result column="sms_type" jdbcType="INTEGER" property="smsType" />
<result column="bill_number" jdbcType="INTEGER" property="billNumber" />
<result column="fee" jdbcType="DOUBLE" property="fee" />
<result column="sms_content" jdbcType="VARCHAR" property="smsContent" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="deduction_time" jdbcType="TIMESTAMP" property="deductionTime" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="enterprise_sms_package_id" jdbcType="INTEGER" property="enterpriseSmsPackageId" />
<result column="nation_code" jdbcType="VARCHAR" property="nationCode" />
<result column="nation_name" jdbcType="VARCHAR" property="nationName" />
<result column="ecu_id" jdbcType="BIGINT" property="ecuId" />
<result column="mcu_id" jdbcType="BIGINT" property="mcuId" />
<result column="member_card_id" jdbcType="BIGINT" property="memberCardId" />
<result column="member_card_name" jdbcType="VARCHAR" property="memberCardName" />
<result column="member_name" jdbcType="VARCHAR" property="memberName" />
<result column="store_brand_name" jdbcType="VARCHAR" property="storeBrandName" />
<result column="store_id" jdbcType="INTEGER" property="storeId" />
<result column="store_name" jdbcType="VARCHAR" property="storeName" />
<result column="store_group_id" jdbcType="INTEGER" property="storeGroupId" />
<result column="store_group_name" jdbcType="VARCHAR" property="storeGroupName" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="user_name" jdbcType="VARCHAR" property="userName" />
<result column="cache_status" jdbcType="INTEGER" property="cacheStatus" />
<result column="database_status" jdbcType="INTEGER" property="databaseStatus" />
</resultMap>
<sql id="Base_Column_List">
sms_record_id, status, send_time, receive_phone, pay_type, app_code, app_name, sms_type,
bill_number, fee, sms_content, create_time, update_time, deduction_time, enterprise_id,
enterprise_sms_package_id, nation_code, nation_name, ecu_id, mcu_id, member_card_id,
member_card_name, member_name, store_brand_name, store_id, store_name, store_group_id,
store_group_name, user_id, user_name, cache_status, database_status
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_international_sms_record
where sms_record_id = #{smsRecordId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from tab_billing_international_sms_record
where sms_record_id = #{smsRecordId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingInternationalSmsRecord">
insert into tab_billing_international_sms_record (sms_record_id, status, send_time,
receive_phone, pay_type, app_code,
app_name, sms_type, bill_number,
fee, sms_content, create_time,
update_time, deduction_time, enterprise_id,
enterprise_sms_package_id, nation_code, nation_name,
ecu_id, mcu_id, member_card_id,
member_card_name, member_name, store_brand_name,
store_id, store_name, store_group_id,
store_group_name, user_id, user_name,
cache_status, database_status)
values (#{smsRecordId,jdbcType=BIGINT}, #{status,jdbcType=INTEGER}, #{sendTime,jdbcType=TIMESTAMP},
#{receivePhone,jdbcType=VARCHAR}, #{payType,jdbcType=INTEGER}, #{appCode,jdbcType=VARCHAR},
#{appName,jdbcType=VARCHAR}, #{smsType,jdbcType=INTEGER}, #{billNumber,jdbcType=INTEGER},
#{fee,jdbcType=DOUBLE}, #{smsContent,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{deductionTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=INTEGER},
#{enterpriseSmsPackageId,jdbcType=INTEGER}, #{nationCode,jdbcType=VARCHAR}, #{nationName,jdbcType=VARCHAR},
#{ecuId,jdbcType=BIGINT}, #{mcuId,jdbcType=BIGINT}, #{memberCardId,jdbcType=BIGINT},
#{memberCardName,jdbcType=VARCHAR}, #{memberName,jdbcType=VARCHAR}, #{storeBrandName,jdbcType=VARCHAR},
#{storeId,jdbcType=INTEGER}, #{storeName,jdbcType=VARCHAR}, #{storeGroupId,jdbcType=INTEGER},
#{storeGroupName,jdbcType=VARCHAR}, #{userId,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR},
#{cacheStatus,jdbcType=INTEGER}, #{databaseStatus,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingInternationalSmsRecord">
insert into tab_billing_international_sms_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="smsRecordId != null">
sms_record_id,
</if>
<if test="status != null">
status,
</if>
<if test="sendTime != null">
send_time,
</if>
<if test="receivePhone != null">
receive_phone,
</if>
<if test="payType != null">
pay_type,
</if>
<if test="appCode != null">
app_code,
</if>
<if test="appName != null">
app_name,
</if>
<if test="smsType != null">
sms_type,
</if>
<if test="billNumber != null">
bill_number,
</if>
<if test="fee != null">
fee,
</if>
<if test="smsContent != null">
sms_content,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="deductionTime != null">
deduction_time,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="enterpriseSmsPackageId != null">
enterprise_sms_package_id,
</if>
<if test="nationCode != null">
nation_code,
</if>
<if test="nationName != null">
nation_name,
</if>
<if test="ecuId != null">
ecu_id,
</if>
<if test="mcuId != null">
mcu_id,
</if>
<if test="memberCardId != null">
member_card_id,
</if>
<if test="memberCardName != null">
member_card_name,
</if>
<if test="memberName != null">
member_name,
</if>
<if test="storeBrandName != null">
store_brand_name,
</if>
<if test="storeId != null">
store_id,
</if>
<if test="storeName != null">
store_name,
</if>
<if test="storeGroupId != null">
store_group_id,
</if>
<if test="storeGroupName != null">
store_group_name,
</if>
<if test="userId != null">
user_id,
</if>
<if test="userName != null">
user_name,
</if>
<if test="cacheStatus != null">
cache_status,
</if>
<if test="databaseStatus != null">
database_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="smsRecordId != null">
#{smsRecordId,jdbcType=BIGINT},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="sendTime != null">
#{sendTime,jdbcType=TIMESTAMP},
</if>
<if test="receivePhone != null">
#{receivePhone,jdbcType=VARCHAR},
</if>
<if test="payType != null">
#{payType,jdbcType=INTEGER},
</if>
<if test="appCode != null">
#{appCode,jdbcType=VARCHAR},
</if>
<if test="appName != null">
#{appName,jdbcType=VARCHAR},
</if>
<if test="smsType != null">
#{smsType,jdbcType=INTEGER},
</if>
<if test="billNumber != null">
#{billNumber,jdbcType=INTEGER},
</if>
<if test="fee != null">
#{fee,jdbcType=DOUBLE},
</if>
<if test="smsContent != null">
#{smsContent,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="deductionTime != null">
#{deductionTime,jdbcType=TIMESTAMP},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="enterpriseSmsPackageId != null">
#{enterpriseSmsPackageId,jdbcType=INTEGER},
</if>
<if test="nationCode != null">
#{nationCode,jdbcType=VARCHAR},
</if>
<if test="nationName != null">
#{nationName,jdbcType=VARCHAR},
</if>
<if test="ecuId != null">
#{ecuId,jdbcType=BIGINT},
</if>
<if test="mcuId != null">
#{mcuId,jdbcType=BIGINT},
</if>
<if test="memberCardId != null">
#{memberCardId,jdbcType=BIGINT},
</if>
<if test="memberCardName != null">
#{memberCardName,jdbcType=VARCHAR},
</if>
<if test="memberName != null">
#{memberName,jdbcType=VARCHAR},
</if>
<if test="storeBrandName != null">
#{storeBrandName,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
#{storeId,jdbcType=INTEGER},
</if>
<if test="storeName != null">
#{storeName,jdbcType=VARCHAR},
</if>
<if test="storeGroupId != null">
#{storeGroupId,jdbcType=INTEGER},
</if>
<if test="storeGroupName != null">
#{storeGroupName,jdbcType=VARCHAR},
</if>
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="userName != null">
#{userName,jdbcType=VARCHAR},
</if>
<if test="cacheStatus != null">
#{cacheStatus,jdbcType=INTEGER},
</if>
<if test="databaseStatus != null">
#{databaseStatus,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingInternationalSmsRecord">
update tab_billing_international_sms_record
<set>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="sendTime != null">
send_time = #{sendTime,jdbcType=TIMESTAMP},
</if>
<if test="receivePhone != null">
receive_phone = #{receivePhone,jdbcType=VARCHAR},
</if>
<if test="payType != null">
pay_type = #{payType,jdbcType=INTEGER},
</if>
<if test="appCode != null">
app_code = #{appCode,jdbcType=VARCHAR},
</if>
<if test="appName != null">
app_name = #{appName,jdbcType=VARCHAR},
</if>
<if test="smsType != null">
sms_type = #{smsType,jdbcType=INTEGER},
</if>
<if test="billNumber != null">
bill_number = #{billNumber,jdbcType=INTEGER},
</if>
<if test="fee != null">
fee = #{fee,jdbcType=DOUBLE},
</if>
<if test="smsContent != null">
sms_content = #{smsContent,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="deductionTime != null">
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="enterpriseSmsPackageId != null">
enterprise_sms_package_id = #{enterpriseSmsPackageId,jdbcType=INTEGER},
</if>
<if test="nationCode != null">
nation_code = #{nationCode,jdbcType=VARCHAR},
</if>
<if test="nationName != null">
nation_name = #{nationName,jdbcType=VARCHAR},
</if>
<if test="ecuId != null">
ecu_id = #{ecuId,jdbcType=BIGINT},
</if>
<if test="mcuId != null">
mcu_id = #{mcuId,jdbcType=BIGINT},
</if>
<if test="memberCardId != null">
member_card_id = #{memberCardId,jdbcType=BIGINT},
</if>
<if test="memberCardName != null">
member_card_name = #{memberCardName,jdbcType=VARCHAR},
</if>
<if test="memberName != null">
member_name = #{memberName,jdbcType=VARCHAR},
</if>
<if test="storeBrandName != null">
store_brand_name = #{storeBrandName,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
store_id = #{storeId,jdbcType=INTEGER},
</if>
<if test="storeName != null">
store_name = #{storeName,jdbcType=VARCHAR},
</if>
<if test="storeGroupId != null">
store_group_id = #{storeGroupId,jdbcType=INTEGER},
</if>
<if test="storeGroupName != null">
store_group_name = #{storeGroupName,jdbcType=VARCHAR},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="userName != null">
user_name = #{userName,jdbcType=VARCHAR},
</if>
<if test="cacheStatus != null">
cache_status = #{cacheStatus,jdbcType=INTEGER},
</if>
<if test="databaseStatus != null">
database_status = #{databaseStatus,jdbcType=INTEGER},
</if>
</set>
where sms_record_id = #{smsRecordId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabBillingInternationalSmsRecord">
update tab_billing_international_sms_record
set status = #{status,jdbcType=INTEGER},
send_time = #{sendTime,jdbcType=TIMESTAMP},
receive_phone = #{receivePhone,jdbcType=VARCHAR},
pay_type = #{payType,jdbcType=INTEGER},
app_code = #{appCode,jdbcType=VARCHAR},
app_name = #{appName,jdbcType=VARCHAR},
sms_type = #{smsType,jdbcType=INTEGER},
bill_number = #{billNumber,jdbcType=INTEGER},
fee = #{fee,jdbcType=DOUBLE},
sms_content = #{smsContent,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
enterprise_sms_package_id = #{enterpriseSmsPackageId,jdbcType=INTEGER},
nation_code = #{nationCode,jdbcType=VARCHAR},
nation_name = #{nationName,jdbcType=VARCHAR},
ecu_id = #{ecuId,jdbcType=BIGINT},
mcu_id = #{mcuId,jdbcType=BIGINT},
member_card_id = #{memberCardId,jdbcType=BIGINT},
member_card_name = #{memberCardName,jdbcType=VARCHAR},
member_name = #{memberName,jdbcType=VARCHAR},
store_brand_name = #{storeBrandName,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=INTEGER},
store_name = #{storeName,jdbcType=VARCHAR},
store_group_id = #{storeGroupId,jdbcType=INTEGER},
store_group_name = #{storeGroupName,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=INTEGER},
user_name = #{userName,jdbcType=VARCHAR},
cache_status = #{cacheStatus,jdbcType=INTEGER},
database_status = #{databaseStatus,jdbcType=INTEGER}
where sms_record_id = #{smsRecordId,jdbcType=BIGINT}
</update>
<select id="listHomeStatistics" parameterType="com.gic.enterprise.qo.HomeStatisticsQO" resultType="com.gic.enterprise.dto.HomeStatisticsDTO">
select
DATE_FORMAT(deduction_time,'%Y-%m-%d') statisticsDate,
ifnull(sum(fee), 0) fee
from tab_billing_international_sms_record
where status = 1
and enterprise_id = #{enterpriseId}
and pay_type = 4
<if test="startTime != null">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
group by statisticsDate
</select>
<select id="getFee" resultType="double">
select
ifnull(sum(fee), 0)
from tab_billing_international_sms_record
where status = 1
and enterprise_id = #{enterpriseId}
and pay_type = 4
<if test="dateType == 1 ">
and date_format(deduction_time,'%Y-%m') = date_format(now(),'%Y-%m')
</if>
<if test="dateType == 2">
and date_format(deduction_time,'%Y-%m') = date_format(DATE_SUB(curdate(), INTERVAL 1 MONTH),'%Y-%m')
</if>
</select>
<select id="getTotalFee" resultType="double">
select
ifnull(sum(fee), 0)
from tab_billing_international_sms_record
where status = 1
and enterprise_id = #{enterpriseId}
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
</select>
<select id="listInternationalSmsRecord" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_international_sms_record
<where>
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
<if test="appCode != null ">
and app_code = #{appCode}
</if>
<if test="null != appCodeList and appCodeList.size > 0">
and app_code in
<foreach collection="appCodeList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="smsContent != null and smsContent != '' ">
and ( sms_content like concat('%', #{smsContent}, '%') or receive_phone like concat('%', #{smsContent}, '%') )
</if>
<if test="smsType != null ">
and sms_type = #{smsType}
</if>
</where>
order by deduction_time desc
</select>
<select id="countInternationalSmsRecord" resultType="int">
select
count(*)
from tab_billing_international_sms_record
<where>
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
<if test="appCode != null ">
and app_code = #{appCode}
</if>
<if test="smsContent != null and smsContent != '' ">
and ( sms_content like concat('%', #{smsContent}, '%') or receive_phone like concat('%', #{smsContent}, '%') )
</if>
</where>
</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.TabBillingOrderMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabBillingOrder">
<id column="order_id" jdbcType="INTEGER" property="orderId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="serial_number" jdbcType="VARCHAR" property="serialNumber" />
<result column="order_status" jdbcType="INTEGER" property="orderStatus" />
<result column="order_content" jdbcType="VARCHAR" property="orderContent" />
<result column="pay_type" jdbcType="INTEGER" property="payType" />
<result column="total_fee" jdbcType="DOUBLE" property="totalFee" />
<result column="total_fee_paid" jdbcType="DOUBLE" property="totalFeePaid" />
<result column="pay_info_id" jdbcType="INTEGER" property="payInfoId" />
<result column="coupon_card_id" jdbcType="INTEGER" property="couponCardId" />
<result column="audit_result_id" jdbcType="INTEGER" property="auditResultId" />
<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="item_json" jdbcType="VARCHAR" property="itemJson" />
<result column="order_type" jdbcType="INTEGER" property="orderType" />
<result column="initiator_user" jdbcType="INTEGER" property="initiatorUser" />
</resultMap>
<sql id="Base_Column_List">
order_id, enterprise_id, serial_number, order_status, order_content, pay_type, total_fee,
total_fee_paid, pay_info_id, coupon_card_id, audit_result_id, status, create_time,
update_time, item_json, order_type, initiator_user
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_order
where order_id = #{orderId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_billing_order
where order_id = #{orderId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingOrder">
insert into tab_billing_order (order_id, enterprise_id, serial_number,
order_status, order_content, pay_type,
total_fee, total_fee_paid, pay_info_id,
coupon_card_id, audit_result_id, status,
create_time, update_time, item_json,
order_type, initiator_user)
values (#{orderId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{serialNumber,jdbcType=VARCHAR},
#{orderStatus,jdbcType=INTEGER}, #{orderContent,jdbcType=VARCHAR}, #{payType,jdbcType=INTEGER},
#{totalFee,jdbcType=DOUBLE}, #{totalFeePaid,jdbcType=DOUBLE}, #{payInfoId,jdbcType=INTEGER},
#{couponCardId,jdbcType=INTEGER}, #{auditResultId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{itemJson,jdbcType=VARCHAR},
#{orderType,jdbcType=INTEGER}, #{initiatorUser,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingOrder">
<selectKey keyProperty="orderId" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_billing_order
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orderId != null">
order_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="serialNumber != null">
serial_number,
</if>
<if test="orderStatus != null">
order_status,
</if>
<if test="orderContent != null">
order_content,
</if>
<if test="payType != null">
pay_type,
</if>
<if test="totalFee != null">
total_fee,
</if>
<if test="totalFeePaid != null">
total_fee_paid,
</if>
<if test="payInfoId != null">
pay_info_id,
</if>
<if test="couponCardId != null">
coupon_card_id,
</if>
<if test="auditResultId != null">
audit_result_id,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="itemJson != null">
item_json,
</if>
<if test="orderType != null">
order_type,
</if>
<if test="initiatorUser != null">
initiator_user,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderId != null">
#{orderId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="serialNumber != null">
#{serialNumber,jdbcType=VARCHAR},
</if>
<if test="orderStatus != null">
#{orderStatus,jdbcType=INTEGER},
</if>
<if test="orderContent != null">
#{orderContent,jdbcType=VARCHAR},
</if>
<if test="payType != null">
#{payType,jdbcType=INTEGER},
</if>
<if test="totalFee != null">
#{totalFee,jdbcType=DOUBLE},
</if>
<if test="totalFeePaid != null">
#{totalFeePaid,jdbcType=DOUBLE},
</if>
<if test="payInfoId != null">
#{payInfoId,jdbcType=INTEGER},
</if>
<if test="couponCardId != null">
#{couponCardId,jdbcType=INTEGER},
</if>
<if test="auditResultId != null">
#{auditResultId,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="itemJson != null">
#{itemJson,jdbcType=VARCHAR},
</if>
<if test="orderType != null">
#{orderType,jdbcType=INTEGER},
</if>
<if test="initiatorUser != null">
#{initiatorUser,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingOrder">
update tab_billing_order
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="serialNumber != null">
serial_number = #{serialNumber,jdbcType=VARCHAR},
</if>
<if test="orderStatus != null">
order_status = #{orderStatus,jdbcType=INTEGER},
</if>
<if test="orderContent != null">
order_content = #{orderContent,jdbcType=VARCHAR},
</if>
<if test="payType != null">
pay_type = #{payType,jdbcType=INTEGER},
</if>
<if test="totalFee != null">
total_fee = #{totalFee,jdbcType=DOUBLE},
</if>
<if test="totalFeePaid != null">
total_fee_paid = #{totalFeePaid,jdbcType=DOUBLE},
</if>
<if test="payInfoId != null">
pay_info_id = #{payInfoId,jdbcType=INTEGER},
</if>
<if test="couponCardId != null">
coupon_card_id = #{couponCardId,jdbcType=INTEGER},
</if>
<if test="auditResultId != null">
audit_result_id = #{auditResultId,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="itemJson != null">
item_json = #{itemJson,jdbcType=VARCHAR},
</if>
<if test="orderType != null">
order_type = #{orderType,jdbcType=INTEGER},
</if>
<if test="initiatorUser != null">
initiator_user = #{initiatorUser,jdbcType=INTEGER},
</if>
</set>
where order_id = #{orderId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabBillingOrder">
update tab_billing_order
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
serial_number = #{serialNumber,jdbcType=VARCHAR},
order_status = #{orderStatus,jdbcType=INTEGER},
order_content = #{orderContent,jdbcType=VARCHAR},
pay_type = #{payType,jdbcType=INTEGER},
total_fee = #{totalFee,jdbcType=DOUBLE},
total_fee_paid = #{totalFeePaid,jdbcType=DOUBLE},
pay_info_id = #{payInfoId,jdbcType=INTEGER},
coupon_card_id = #{couponCardId,jdbcType=INTEGER},
audit_result_id = #{auditResultId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
item_json = #{itemJson,jdbcType=VARCHAR},
order_type = #{orderType,jdbcType=INTEGER},
initiator_user = #{initiatorUser,jdbcType=INTEGER}
where order_id = #{orderId,jdbcType=INTEGER}
</update>
<select id="getOrderByPayInfoId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_order
where pay_info_id = #{payInfoId}
</select>
<select id="listOrder" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_order
where enterprise_id = #{enterpriseId}
<if test="status != null">
and order_status=#{status}
</if>
<if test="status == null">
and status != 0
</if>
<if test="search != null">
and (order_content like concat('%',#{search},'%') or serial_number like concat('%', #{search}, '%'))
</if>
<if test="startDate != null">
and DATE_FORMAT(create_time,'%Y-%m-%d') &gt;= #{startDate}
</if>
<if test="endDate != null">
and DATE_FORMAT(create_time,'%Y-%m-%d') &lt;= #{endDate}
</if>
order by create_time desc
</select>
<update id="updateOrderBySerialNumber">
update tab_billing_order
set order_status = #{auditStatus,jdbcType=INTEGER},
total_fee_paid = #{totalFeePaid,jdbcType=DOUBLE}
where serial_number = #{orderSerialNumber,jdbcType=INTEGER}
</update>
<select id="getOrderBySerialNumber" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_order
where serial_number = #{serialNumber}
</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.TabBillingPayInfoMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabBillingPayInfo">
<id column="pay_info_id" jdbcType="INTEGER" property="payInfoId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="serial_number" jdbcType="VARCHAR" property="serialNumber" />
<result column="pay_type" jdbcType="INTEGER" property="payType" />
<result column="total_fee_paid" jdbcType="DOUBLE" property="totalFeePaid" />
<result column="time_start" jdbcType="VARCHAR" property="timeStart" />
<result column="time_end" jdbcType="VARCHAR" property="timeEnd" />
<result column="result_code" jdbcType="INTEGER" property="resultCode" />
<result column="err_code" jdbcType="VARCHAR" property="errCode" />
<result column="err_code_des" jdbcType="VARCHAR" property="errCodeDes" />
<result column="code_url" jdbcType="VARCHAR" property="codeUrl" />
<result column="prepay_id" jdbcType="VARCHAR" property="prepayId" />
<result column="invoice_status" jdbcType="INTEGER" property="invoiceStatus" />
<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="buy_type" jdbcType="INTEGER" property="buyType" />
<result column="order_serial_number" jdbcType="VARCHAR" property="orderSerialNumber" />
<result column="auth_code_id" jdbcType="INTEGER" property="authCodeId" />
<result column="request_code" jdbcType="VARCHAR" property="requestCode" />
<result column="product_description" jdbcType="VARCHAR" property="productDescription" />
</resultMap>
<sql id="Base_Column_List">
pay_info_id, enterprise_id, serial_number, pay_type, total_fee_paid, time_start,
time_end, result_code, err_code, err_code_des, code_url, prepay_id, invoice_status,
status, create_time, update_time, buy_type, order_serial_number, auth_code_id, request_code,
product_description
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_pay_info
where pay_info_id = #{payInfoId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_billing_pay_info
where pay_info_id = #{payInfoId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingPayInfo">
<selectKey keyProperty="payInfoId" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_billing_pay_info (pay_info_id, enterprise_id, serial_number,
pay_type, total_fee_paid, time_start,
time_end, result_code, err_code,
err_code_des, code_url, prepay_id,
invoice_status, status, create_time,
update_time, buy_type, order_serial_number,
auth_code_id, request_code, product_description
)
values (#{payInfoId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{serialNumber,jdbcType=VARCHAR},
#{payType,jdbcType=INTEGER}, #{totalFeePaid,jdbcType=DOUBLE}, #{timeStart,jdbcType=VARCHAR},
#{timeEnd,jdbcType=VARCHAR}, #{resultCode,jdbcType=INTEGER}, #{errCode,jdbcType=VARCHAR},
#{errCodeDes,jdbcType=VARCHAR}, #{codeUrl,jdbcType=VARCHAR}, #{prepayId,jdbcType=VARCHAR},
#{invoiceStatus,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{buyType,jdbcType=INTEGER}, #{orderSerialNumber,jdbcType=VARCHAR},
#{authCodeId,jdbcType=INTEGER}, #{requestCode,jdbcType=VARCHAR}, #{productDescription,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingPayInfo">
<selectKey keyProperty="payInfoId" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_billing_pay_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="payInfoId != null">
pay_info_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="serialNumber != null">
serial_number,
</if>
<if test="payType != null">
pay_type,
</if>
<if test="totalFeePaid != null">
total_fee_paid,
</if>
<if test="timeStart != null">
time_start,
</if>
<if test="timeEnd != null">
time_end,
</if>
<if test="resultCode != null">
result_code,
</if>
<if test="errCode != null">
err_code,
</if>
<if test="errCodeDes != null">
err_code_des,
</if>
<if test="codeUrl != null">
code_url,
</if>
<if test="prepayId != null">
prepay_id,
</if>
<if test="invoiceStatus != null">
invoice_status,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="buyType != null">
buy_type,
</if>
<if test="orderSerialNumber != null">
order_serial_number,
</if>
<if test="authCodeId != null">
auth_code_id,
</if>
<if test="requestCode != null">
request_code,
</if>
<if test="productDescription != null">
product_description,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="payInfoId != null">
#{payInfoId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="serialNumber != null">
#{serialNumber,jdbcType=VARCHAR},
</if>
<if test="payType != null">
#{payType,jdbcType=INTEGER},
</if>
<if test="totalFeePaid != null">
#{totalFeePaid,jdbcType=DOUBLE},
</if>
<if test="timeStart != null">
#{timeStart,jdbcType=VARCHAR},
</if>
<if test="timeEnd != null">
#{timeEnd,jdbcType=VARCHAR},
</if>
<if test="resultCode != null">
#{resultCode,jdbcType=INTEGER},
</if>
<if test="errCode != null">
#{errCode,jdbcType=VARCHAR},
</if>
<if test="errCodeDes != null">
#{errCodeDes,jdbcType=VARCHAR},
</if>
<if test="codeUrl != null">
#{codeUrl,jdbcType=VARCHAR},
</if>
<if test="prepayId != null">
#{prepayId,jdbcType=VARCHAR},
</if>
<if test="invoiceStatus != null">
#{invoiceStatus,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="buyType != null">
#{buyType,jdbcType=INTEGER},
</if>
<if test="orderSerialNumber != null">
#{orderSerialNumber,jdbcType=VARCHAR},
</if>
<if test="authCodeId != null">
#{authCodeId,jdbcType=INTEGER},
</if>
<if test="requestCode != null">
#{requestCode,jdbcType=VARCHAR},
</if>
<if test="productDescription != null">
#{productDescription,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingPayInfo">
update tab_billing_pay_info
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="serialNumber != null">
serial_number = #{serialNumber,jdbcType=VARCHAR},
</if>
<if test="payType != null">
pay_type = #{payType,jdbcType=INTEGER},
</if>
<if test="totalFeePaid != null">
total_fee_paid = #{totalFeePaid,jdbcType=DOUBLE},
</if>
<if test="timeStart != null">
time_start = #{timeStart,jdbcType=VARCHAR},
</if>
<if test="timeEnd != null">
time_end = #{timeEnd,jdbcType=VARCHAR},
</if>
<if test="resultCode != null">
result_code = #{resultCode,jdbcType=INTEGER},
</if>
<if test="errCode != null">
err_code = #{errCode,jdbcType=VARCHAR},
</if>
<if test="errCodeDes != null">
err_code_des = #{errCodeDes,jdbcType=VARCHAR},
</if>
<if test="codeUrl != null">
code_url = #{codeUrl,jdbcType=VARCHAR},
</if>
<if test="prepayId != null">
prepay_id = #{prepayId,jdbcType=VARCHAR},
</if>
<if test="invoiceStatus != null">
invoice_status = #{invoiceStatus,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="buyType != null">
buy_type = #{buyType,jdbcType=INTEGER},
</if>
<if test="orderSerialNumber != null">
order_serial_number = #{orderSerialNumber,jdbcType=VARCHAR},
</if>
<if test="authCodeId != null">
auth_code_id = #{authCodeId,jdbcType=INTEGER},
</if>
<if test="requestCode != null">
request_code = #{requestCode,jdbcType=VARCHAR},
</if>
<if test="productDescription != null">
product_description = #{productDescription,jdbcType=VARCHAR},
</if>
</set>
where pay_info_id = #{payInfoId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabBillingPayInfo">
update tab_billing_pay_info
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
serial_number = #{serialNumber,jdbcType=VARCHAR},
pay_type = #{payType,jdbcType=INTEGER},
total_fee_paid = #{totalFeePaid,jdbcType=DOUBLE},
time_start = #{timeStart,jdbcType=VARCHAR},
time_end = #{timeEnd,jdbcType=VARCHAR},
result_code = #{resultCode,jdbcType=INTEGER},
err_code = #{errCode,jdbcType=VARCHAR},
err_code_des = #{errCodeDes,jdbcType=VARCHAR},
code_url = #{codeUrl,jdbcType=VARCHAR},
prepay_id = #{prepayId,jdbcType=VARCHAR},
invoice_status = #{invoiceStatus,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
buy_type = #{buyType,jdbcType=INTEGER},
order_serial_number = #{orderSerialNumber,jdbcType=VARCHAR},
auth_code_id = #{authCodeId,jdbcType=INTEGER},
request_code = #{requestCode,jdbcType=VARCHAR},
product_description = #{productDescription,jdbcType=VARCHAR}
where pay_info_id = #{payInfoId,jdbcType=INTEGER}
</update>
<select id="listBill" parameterType="com.gic.enterprise.qo.BillListQueryQO" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_pay_info
where enterprise_id = #{enterpriseId}
and time_end is not null
and invoice_status = 0
and status = 1
<if test="serialNumber != null and serialNumber != '' ">
and (serial_number like concat('%', #{serialNumber}, '%') or order_serial_number like concat('%', #{serialNumber}, '%'))
</if>
<if test="buyType != null">
and buy_type = #{buyType}
</if>
<if test="payType != null">
and pay_type = #{payType}
</if>
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(time_end,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and endTime != '' ">
and DATE_FORMAT(time_end,'%Y-%m-%d') &lt;= #{endTime}
</if>
order by time_end desc
</select>
<update id="updateBySerialNumber" parameterType="com.gic.enterprise.entity.TabBillingPayInfo">
update tab_billing_pay_info
<set>
<if test="payType != null">
pay_type = #{payType,jdbcType=INTEGER},
</if>
<if test="totalFeePaid != null">
total_fee_paid = #{totalFeePaid,jdbcType=DOUBLE},
</if>
<if test="timeStart != null">
time_start = #{timeStart,jdbcType=VARCHAR},
</if>
<if test="timeEnd != null">
time_end = #{timeEnd,jdbcType=VARCHAR},
</if>
<if test="resultCode != null">
result_code = #{resultCode,jdbcType=INTEGER},
</if>
<if test="errCode != null">
err_code = #{errCode,jdbcType=VARCHAR},
</if>
<if test="errCodeDes != null">
err_code_des = #{errCodeDes,jdbcType=VARCHAR},
</if>
<if test="codeUrl != null">
code_url = #{codeUrl,jdbcType=VARCHAR},
</if>
<if test="prepayId != null">
prepay_id = #{prepayId,jdbcType=VARCHAR},
</if>
<if test="invoiceStatus != null">
invoice_status = #{invoiceStatus,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="buyType != null">
buy_type = #{buyType,jdbcType=INTEGER},
</if>
</set>
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
and serial_number = #{serialNumber,jdbcType=VARCHAR}
<if test="buyType != null ">
and buy_type = #{buyType}
</if>
</update>
<select id="getBySerialNumber" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_pay_info
where serial_number = #{serialNumber}
</select>
<select id="getByOrderSerialNumber" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_pay_info
where status = 1
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="requestCode != null and requestCode != '' ">
and request_code = #{requestCode}
</if>
<if test="orderSerialNumber != null and orderSerialNumber != '' ">
and order_serial_number = #{orderSerialNumber}
</if>
<if test="payType != null ">
and pay_type = #{payType}
</if>
order by create_time desc
limit 1
</select>
<update id="cancelPay">
update tab_billing_pay_info set status = 0
where enterprise_id = #{enterpriseId}
and request_code = #{requestCode}
and order_serial_number = #{orderSerialNumber}
and result_code = 0
and status = 1
</update>
<update id="delOtherPayInfoExceptId">
update tab_billing_pay_info set status = 0
where enterprise_id = #{enterpriseId}
and pay_info_id &lt;&gt; #{payInfoId}
and order_serial_number = #{orderSerialNumber}
</update>
<update id="updateInvoiceStatus">
update tab_billing_pay_info set invoice_status = 1
where status = 1
and serial_number in (#{serialNumbers})
</update>
<select id="getPayInfoBySerialNumber" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_pay_info
where serial_number = #{serialNumber}
and status = 1
and invoice_status = 0
</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.TabBillingRechargeRecordMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabBillingRechargeRecord">
<id column="recharge_record_id" jdbcType="INTEGER" property="rechargeRecordId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="serial_number" jdbcType="VARCHAR" property="serialNumber" />
<result column="online_serial_number" jdbcType="VARCHAR" property="onlineSerialNumber" />
<result column="total_fee" jdbcType="DOUBLE" property="totalFee" />
<result column="total_fee_paid" jdbcType="DOUBLE" property="totalFeePaid" />
<result column="pay_type" jdbcType="INTEGER" property="payType" />
<result column="pay_info_id" jdbcType="INTEGER" property="payInfoId" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="initiator" jdbcType="INTEGER" property="initiator" />
<result column="initiator_user" jdbcType="INTEGER" property="initiatorUser" />
<result column="initiator_name" jdbcType="VARCHAR" property="initiatorName" />
<result column="audit_status" jdbcType="INTEGER" property="auditStatus" />
<result column="verification_code" jdbcType="VARCHAR" property="verificationCode" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="deduction_time" jdbcType="TIMESTAMP" property="deductionTime" />
</resultMap>
<sql id="Base_Column_List">
recharge_record_id, enterprise_id, serial_number, online_serial_number, total_fee,
total_fee_paid, pay_type, pay_info_id, status, initiator, initiator_user, initiator_name,
audit_status, verification_code, create_time, update_time, deduction_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_recharge_record
where recharge_record_id = #{rechargeRecordId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_billing_recharge_record
where recharge_record_id = #{rechargeRecordId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingRechargeRecord">
insert into tab_billing_recharge_record (recharge_record_id, enterprise_id, serial_number,
online_serial_number, total_fee, total_fee_paid,
pay_type, pay_info_id, status,
initiator, initiator_user, initiator_name,
audit_status, verification_code, create_time,
update_time, deduction_time)
values (#{rechargeRecordId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{serialNumber,jdbcType=VARCHAR},
#{onlineSerialNumber,jdbcType=VARCHAR}, #{totalFee,jdbcType=DOUBLE}, #{totalFeePaid,jdbcType=DOUBLE},
#{payType,jdbcType=INTEGER}, #{payInfoId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{initiator,jdbcType=INTEGER}, #{initiatorUser,jdbcType=INTEGER}, #{initiatorName,jdbcType=VARCHAR},
#{auditStatus,jdbcType=INTEGER}, #{verificationCode,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{deductionTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingRechargeRecord">
insert into tab_billing_recharge_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="rechargeRecordId != null">
recharge_record_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="serialNumber != null">
serial_number,
</if>
<if test="onlineSerialNumber != null">
online_serial_number,
</if>
<if test="totalFee != null">
total_fee,
</if>
<if test="totalFeePaid != null">
total_fee_paid,
</if>
<if test="payType != null">
pay_type,
</if>
<if test="payInfoId != null">
pay_info_id,
</if>
<if test="status != null">
status,
</if>
<if test="initiator != null">
initiator,
</if>
<if test="initiatorUser != null">
initiator_user,
</if>
<if test="initiatorName != null">
initiator_name,
</if>
<if test="auditStatus != null">
audit_status,
</if>
<if test="verificationCode != null">
verification_code,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="deductionTime != null">
deduction_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="rechargeRecordId != null">
#{rechargeRecordId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="serialNumber != null">
#{serialNumber,jdbcType=VARCHAR},
</if>
<if test="onlineSerialNumber != null">
#{onlineSerialNumber,jdbcType=VARCHAR},
</if>
<if test="totalFee != null">
#{totalFee,jdbcType=DOUBLE},
</if>
<if test="totalFeePaid != null">
#{totalFeePaid,jdbcType=DOUBLE},
</if>
<if test="payType != null">
#{payType,jdbcType=INTEGER},
</if>
<if test="payInfoId != null">
#{payInfoId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="initiator != null">
#{initiator,jdbcType=INTEGER},
</if>
<if test="initiatorUser != null">
#{initiatorUser,jdbcType=INTEGER},
</if>
<if test="initiatorName != null">
#{initiatorName,jdbcType=VARCHAR},
</if>
<if test="auditStatus != null">
#{auditStatus,jdbcType=INTEGER},
</if>
<if test="verificationCode != null">
#{verificationCode,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="deductionTime != null">
#{deductionTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingRechargeRecord">
update tab_billing_recharge_record
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="serialNumber != null">
serial_number = #{serialNumber,jdbcType=VARCHAR},
</if>
<if test="onlineSerialNumber != null">
online_serial_number = #{onlineSerialNumber,jdbcType=VARCHAR},
</if>
<if test="totalFee != null">
total_fee = #{totalFee,jdbcType=DOUBLE},
</if>
<if test="totalFeePaid != null">
total_fee_paid = #{totalFeePaid,jdbcType=DOUBLE},
</if>
<if test="payType != null">
pay_type = #{payType,jdbcType=INTEGER},
</if>
<if test="payInfoId != null">
pay_info_id = #{payInfoId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="initiator != null">
initiator = #{initiator,jdbcType=INTEGER},
</if>
<if test="initiatorUser != null">
initiator_user = #{initiatorUser,jdbcType=INTEGER},
</if>
<if test="initiatorName != null">
initiator_name = #{initiatorName,jdbcType=VARCHAR},
</if>
<if test="auditStatus != null">
audit_status = #{auditStatus,jdbcType=INTEGER},
</if>
<if test="verificationCode != null">
verification_code = #{verificationCode,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="deductionTime != null">
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
</if>
</set>
where recharge_record_id = #{rechargeRecordId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabBillingRechargeRecord">
update tab_billing_recharge_record
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
serial_number = #{serialNumber,jdbcType=VARCHAR},
online_serial_number = #{onlineSerialNumber,jdbcType=VARCHAR},
total_fee = #{totalFee,jdbcType=DOUBLE},
total_fee_paid = #{totalFeePaid,jdbcType=DOUBLE},
pay_type = #{payType,jdbcType=INTEGER},
pay_info_id = #{payInfoId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
initiator = #{initiator,jdbcType=INTEGER},
initiator_user = #{initiatorUser,jdbcType=INTEGER},
initiator_name = #{initiatorName,jdbcType=VARCHAR},
audit_status = #{auditStatus,jdbcType=INTEGER},
verification_code = #{verificationCode,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
deduction_time = #{deductionTime,jdbcType=TIMESTAMP}
where recharge_record_id = #{rechargeRecordId,jdbcType=INTEGER}
</update>
<select id="listRechargeRecord" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_recharge_record
where status = 1
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="startTime != null and startTime != '' ">
and create_time &gt;= #{startTime}
</if>
<if test="endTime != null and endTime != '' ">
and create_time &lt;= #{endTime}
</if>
<if test="payType != null ">
and pay_type = #{payType}
</if>
<if test="auditStatus != null ">
and audit_status = #{auditStatus}
</if>
<if test="auditStatus == null">
and audit_status &lt;&gt; 0
</if>
<if test="serialNumber != null and serialNumber != '' ">
and serial_number like concat('%', #{serialNumber}, '%')
</if>
order by create_time desc
</select>
<update id="updateBySerialNumber">
update tab_billing_recharge_record
set total_fee_paid = #{totalFeePaid},
audit_status = #{auditStatus},
deduction_time = #{timeEnd},
online_serial_number = #{onlineSerialNumber}
where serial_number = #{orderSerialNumber}
</update>
<select id="getAuditingRechargeRecord" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_recharge_record
where enterprise_id = #{enterpriseId}
and status = 1
and audit_status = 1
order by create_time desc
limit 1
</select>
<select id="getRechargeRecordBySerialNumber" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_recharge_record
where serial_number = #{serialNumber}
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.TabBillingRecordingStorageRecordMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabBillingRecordingStorageRecord">
<id column="recording_storage_record_id" jdbcType="INTEGER" property="recordingStorageRecordId" />
<result column="caller_name" jdbcType="VARCHAR" property="callerName" />
<result column="caller_phone" jdbcType="VARCHAR" property="callerPhone" />
<result column="fee" jdbcType="DOUBLE" property="fee" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="deduction_time" jdbcType="TIMESTAMP" property="deductionTime" />
<result column="called_id" jdbcType="BIGINT" property="calledId" />
<result column="called_phone" jdbcType="VARCHAR" property="calledPhone" />
<result column="app_code" jdbcType="VARCHAR" property="appCode" />
<result column="app_name" jdbcType="VARCHAR" property="appName" />
<result column="voice_time" jdbcType="VARCHAR" property="voiceTime" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="pay_serial_number" jdbcType="VARCHAR" property="paySerialNumber" />
<result column="unit_fee" jdbcType="DOUBLE" property="unitFee" />
<result column="storage_duration" jdbcType="VARCHAR" property="storageDuration" />
<result column="member_name" jdbcType="VARCHAR" property="memberName" />
<result column="store_id" jdbcType="INTEGER" property="storeId" />
<result column="store_name" jdbcType="VARCHAR" property="storeName" />
<result column="store_group_id" jdbcType="INTEGER" property="storeGroupId" />
<result column="store_group_name" jdbcType="VARCHAR" property="storeGroupName" />
<result column="call_time" jdbcType="TIMESTAMP" property="callTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<sql id="Base_Column_List">
recording_storage_record_id, caller_name, caller_phone, fee, status, create_time,
deduction_time, called_id, called_phone, app_code, app_name, voice_time, enterprise_id,
pay_serial_number, unit_fee, storage_duration, member_name, store_id, store_name,
store_group_id, store_group_name, call_time, remark
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_recording_storage_record
where recording_storage_record_id = #{recordingStorageRecordId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_billing_recording_storage_record
where recording_storage_record_id = #{recordingStorageRecordId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingRecordingStorageRecord">
insert into tab_billing_recording_storage_record (recording_storage_record_id, caller_name,
caller_phone, fee, status,
create_time, deduction_time, called_id,
called_phone, app_code, app_name,
voice_time, enterprise_id, pay_serial_number,
unit_fee, storage_duration, member_name,
store_id, store_name, store_group_id,
store_group_name, call_time, remark
)
values (#{recordingStorageRecordId,jdbcType=INTEGER}, #{callerName,jdbcType=VARCHAR},
#{callerPhone,jdbcType=VARCHAR}, #{fee,jdbcType=DOUBLE}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{deductionTime,jdbcType=TIMESTAMP}, #{calledId,jdbcType=BIGINT},
#{calledPhone,jdbcType=VARCHAR}, #{appCode,jdbcType=VARCHAR}, #{appName,jdbcType=VARCHAR},
#{voiceTime,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=INTEGER}, #{paySerialNumber,jdbcType=VARCHAR},
#{unitFee,jdbcType=DOUBLE}, #{storageDuration,jdbcType=VARCHAR}, #{memberName,jdbcType=VARCHAR},
#{storeId,jdbcType=INTEGER}, #{storeName,jdbcType=VARCHAR}, #{storeGroupId,jdbcType=INTEGER},
#{storeGroupName,jdbcType=VARCHAR}, #{callTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingRecordingStorageRecord">
insert into tab_billing_recording_storage_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="recordingStorageRecordId != null">
recording_storage_record_id,
</if>
<if test="callerName != null">
caller_name,
</if>
<if test="callerPhone != null">
caller_phone,
</if>
<if test="fee != null">
fee,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="deductionTime != null">
deduction_time,
</if>
<if test="calledId != null">
called_id,
</if>
<if test="calledPhone != null">
called_phone,
</if>
<if test="appCode != null">
app_code,
</if>
<if test="appName != null">
app_name,
</if>
<if test="voiceTime != null">
voice_time,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="paySerialNumber != null">
pay_serial_number,
</if>
<if test="unitFee != null">
unit_fee,
</if>
<if test="storageDuration != null">
storage_duration,
</if>
<if test="memberName != null">
member_name,
</if>
<if test="storeId != null">
store_id,
</if>
<if test="storeName != null">
store_name,
</if>
<if test="storeGroupId != null">
store_group_id,
</if>
<if test="storeGroupName != null">
store_group_name,
</if>
<if test="callTime != null">
call_time,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="recordingStorageRecordId != null">
#{recordingStorageRecordId,jdbcType=INTEGER},
</if>
<if test="callerName != null">
#{callerName,jdbcType=VARCHAR},
</if>
<if test="callerPhone != null">
#{callerPhone,jdbcType=VARCHAR},
</if>
<if test="fee != null">
#{fee,jdbcType=DOUBLE},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="deductionTime != null">
#{deductionTime,jdbcType=TIMESTAMP},
</if>
<if test="calledId != null">
#{calledId,jdbcType=BIGINT},
</if>
<if test="calledPhone != null">
#{calledPhone,jdbcType=VARCHAR},
</if>
<if test="appCode != null">
#{appCode,jdbcType=VARCHAR},
</if>
<if test="appName != null">
#{appName,jdbcType=VARCHAR},
</if>
<if test="voiceTime != null">
#{voiceTime,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="paySerialNumber != null">
#{paySerialNumber,jdbcType=VARCHAR},
</if>
<if test="unitFee != null">
#{unitFee,jdbcType=DOUBLE},
</if>
<if test="storageDuration != null">
#{storageDuration,jdbcType=VARCHAR},
</if>
<if test="memberName != null">
#{memberName,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
#{storeId,jdbcType=INTEGER},
</if>
<if test="storeName != null">
#{storeName,jdbcType=VARCHAR},
</if>
<if test="storeGroupId != null">
#{storeGroupId,jdbcType=INTEGER},
</if>
<if test="storeGroupName != null">
#{storeGroupName,jdbcType=VARCHAR},
</if>
<if test="callTime != null">
#{callTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingRecordingStorageRecord">
update tab_billing_recording_storage_record
<set>
<if test="callerName != null">
caller_name = #{callerName,jdbcType=VARCHAR},
</if>
<if test="callerPhone != null">
caller_phone = #{callerPhone,jdbcType=VARCHAR},
</if>
<if test="fee != null">
fee = #{fee,jdbcType=DOUBLE},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="deductionTime != null">
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
</if>
<if test="calledId != null">
called_id = #{calledId,jdbcType=BIGINT},
</if>
<if test="calledPhone != null">
called_phone = #{calledPhone,jdbcType=VARCHAR},
</if>
<if test="appCode != null">
app_code = #{appCode,jdbcType=VARCHAR},
</if>
<if test="appName != null">
app_name = #{appName,jdbcType=VARCHAR},
</if>
<if test="voiceTime != null">
voice_time = #{voiceTime,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="paySerialNumber != null">
pay_serial_number = #{paySerialNumber,jdbcType=VARCHAR},
</if>
<if test="unitFee != null">
unit_fee = #{unitFee,jdbcType=DOUBLE},
</if>
<if test="storageDuration != null">
storage_duration = #{storageDuration,jdbcType=VARCHAR},
</if>
<if test="memberName != null">
member_name = #{memberName,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
store_id = #{storeId,jdbcType=INTEGER},
</if>
<if test="storeName != null">
store_name = #{storeName,jdbcType=VARCHAR},
</if>
<if test="storeGroupId != null">
store_group_id = #{storeGroupId,jdbcType=INTEGER},
</if>
<if test="storeGroupName != null">
store_group_name = #{storeGroupName,jdbcType=VARCHAR},
</if>
<if test="callTime != null">
call_time = #{callTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where recording_storage_record_id = #{recordingStorageRecordId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabBillingRecordingStorageRecord">
update tab_billing_recording_storage_record
set caller_name = #{callerName,jdbcType=VARCHAR},
caller_phone = #{callerPhone,jdbcType=VARCHAR},
fee = #{fee,jdbcType=DOUBLE},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
called_id = #{calledId,jdbcType=BIGINT},
called_phone = #{calledPhone,jdbcType=VARCHAR},
app_code = #{appCode,jdbcType=VARCHAR},
app_name = #{appName,jdbcType=VARCHAR},
voice_time = #{voiceTime,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
pay_serial_number = #{paySerialNumber,jdbcType=VARCHAR},
unit_fee = #{unitFee,jdbcType=DOUBLE},
storage_duration = #{storageDuration,jdbcType=VARCHAR},
member_name = #{memberName,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=INTEGER},
store_name = #{storeName,jdbcType=VARCHAR},
store_group_id = #{storeGroupId,jdbcType=INTEGER},
store_group_name = #{storeGroupName,jdbcType=VARCHAR},
call_time = #{callTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR}
where recording_storage_record_id = #{recordingStorageRecordId,jdbcType=INTEGER}
</update>
<select id="listHomeStatistics" parameterType="com.gic.enterprise.qo.HomeStatisticsQO" resultType="com.gic.enterprise.dto.HomeStatisticsDTO">
select
DATE_FORMAT(deduction_time,'%Y-%m-%d') statisticsDate,
ifnull(sum(fee), 0) fee
from tab_billing_recording_storage_record
where status = 1
and enterprise_id = #{enterpriseId}
<if test="startTime != null">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
group by statisticsDate
</select>
<select id="getFee" resultType="double">
select
ifnull(sum(fee), 0)
from tab_billing_recording_storage_record
where status = 1
and enterprise_id = #{enterpriseId}
<if test="dateType == 1 ">
and date_format(deduction_time,'%Y-%m') = date_format(now(),'%Y-%m')
</if>
<if test="dateType == 2">
and date_format(deduction_time,'%Y-%m') = date_format(DATE_SUB(curdate(), INTERVAL 1 MONTH),'%Y-%m')
</if>
</select>
<select id="getTotalFee" resultType="double">
select
ifnull(sum(fee), 0)
from tab_billing_recording_storage_record
where status = 1
and enterprise_id = #{enterpriseId}
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
</select>
<select id="listRecordingStorageRecord" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_recording_storage_record
<where>
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
<if test="phone != null and phone != '' ">
and ( caller_phone like concat('%', #{phone}, '%') or called_phone like concat('%', #{phone}, '%') )
</if>
</where>
order by create_time desc
</select>
<select id="countRecordingStorageRecord" resultType="int">
select
count(*)
from tab_billing_recording_storage_record
<where>
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
<if test="phone != null and phone != '' ">
and ( caller_phone like concat('%', #{phone}, '%') or called_phone like concat('%', #{phone}, '%') )
</if>
</where>
</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.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.TabBillingSmsPackageRecordMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabBillingSmsPackageRecord">
<id column="sms_package_record_id" jdbcType="INTEGER" property="smsPackageRecordId" />
<result column="product_name" jdbcType="VARCHAR" property="productName" />
<result column="item_count" jdbcType="INTEGER" property="itemCount" />
<result column="item_fee" jdbcType="DOUBLE" property="itemFee" />
<result column="total_fee" jdbcType="DOUBLE" property="totalFee" />
<result column="pay_type" jdbcType="INTEGER" property="payType" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="order_id" jdbcType="INTEGER" property="orderId" />
<result column="deduction_time" jdbcType="TIMESTAMP" property="deductionTime" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="discount_type" jdbcType="INTEGER" property="discountType" />
<result column="card_name" jdbcType="VARCHAR" property="cardName" />
<result column="card_amount" jdbcType="DOUBLE" property="cardAmount" />
<result column="paid_fee" jdbcType="DOUBLE" property="paidFee" />
<result column="operator_id" jdbcType="INTEGER" property="operatorId" />
<result column="operator_name" jdbcType="VARCHAR" property="operatorName" />
</resultMap>
<sql id="Base_Column_List">
sms_package_record_id, product_name, item_count, item_fee, total_fee, pay_type, status,
create_time, order_id, deduction_time, enterprise_id, discount_type, card_name, card_amount,
paid_fee, operator_id, operator_name
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_sms_package_record
where sms_package_record_id = #{smsPackageRecordId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_billing_sms_package_record
where sms_package_record_id = #{smsPackageRecordId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingSmsPackageRecord">
insert into tab_billing_sms_package_record (sms_package_record_id, product_name,
item_count, item_fee, total_fee,
pay_type, status, create_time,
order_id, deduction_time, enterprise_id,
discount_type, card_name, card_amount,
paid_fee, operator_id, operator_name
)
values (#{smsPackageRecordId,jdbcType=INTEGER}, #{productName,jdbcType=VARCHAR},
#{itemCount,jdbcType=INTEGER}, #{itemFee,jdbcType=DOUBLE}, #{totalFee,jdbcType=DOUBLE},
#{payType,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{orderId,jdbcType=INTEGER}, #{deductionTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=INTEGER},
#{discountType,jdbcType=INTEGER}, #{cardName,jdbcType=VARCHAR}, #{cardAmount,jdbcType=DOUBLE},
#{paidFee,jdbcType=DOUBLE}, #{operatorId,jdbcType=INTEGER}, #{operatorName,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingSmsPackageRecord">
insert into tab_billing_sms_package_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="smsPackageRecordId != null">
sms_package_record_id,
</if>
<if test="productName != null">
product_name,
</if>
<if test="itemCount != null">
item_count,
</if>
<if test="itemFee != null">
item_fee,
</if>
<if test="totalFee != null">
total_fee,
</if>
<if test="payType != null">
pay_type,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="orderId != null">
order_id,
</if>
<if test="deductionTime != null">
deduction_time,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="discountType != null">
discount_type,
</if>
<if test="cardName != null">
card_name,
</if>
<if test="cardAmount != null">
card_amount,
</if>
<if test="paidFee != null">
paid_fee,
</if>
<if test="operatorId != null">
operator_id,
</if>
<if test="operatorName != null">
operator_name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="smsPackageRecordId != null">
#{smsPackageRecordId,jdbcType=INTEGER},
</if>
<if test="productName != null">
#{productName,jdbcType=VARCHAR},
</if>
<if test="itemCount != null">
#{itemCount,jdbcType=INTEGER},
</if>
<if test="itemFee != null">
#{itemFee,jdbcType=DOUBLE},
</if>
<if test="totalFee != null">
#{totalFee,jdbcType=DOUBLE},
</if>
<if test="payType != null">
#{payType,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="orderId != null">
#{orderId,jdbcType=INTEGER},
</if>
<if test="deductionTime != null">
#{deductionTime,jdbcType=TIMESTAMP},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="discountType != null">
#{discountType,jdbcType=INTEGER},
</if>
<if test="cardName != null">
#{cardName,jdbcType=VARCHAR},
</if>
<if test="cardAmount != null">
#{cardAmount,jdbcType=DOUBLE},
</if>
<if test="paidFee != null">
#{paidFee,jdbcType=DOUBLE},
</if>
<if test="operatorId != null">
#{operatorId,jdbcType=INTEGER},
</if>
<if test="operatorName != null">
#{operatorName,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingSmsPackageRecord">
update tab_billing_sms_package_record
<set>
<if test="productName != null">
product_name = #{productName,jdbcType=VARCHAR},
</if>
<if test="itemCount != null">
item_count = #{itemCount,jdbcType=INTEGER},
</if>
<if test="itemFee != null">
item_fee = #{itemFee,jdbcType=DOUBLE},
</if>
<if test="totalFee != null">
total_fee = #{totalFee,jdbcType=DOUBLE},
</if>
<if test="payType != null">
pay_type = #{payType,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="orderId != null">
order_id = #{orderId,jdbcType=INTEGER},
</if>
<if test="deductionTime != null">
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="discountType != null">
discount_type = #{discountType,jdbcType=INTEGER},
</if>
<if test="cardName != null">
card_name = #{cardName,jdbcType=VARCHAR},
</if>
<if test="cardAmount != null">
card_amount = #{cardAmount,jdbcType=DOUBLE},
</if>
<if test="paidFee != null">
paid_fee = #{paidFee,jdbcType=DOUBLE},
</if>
<if test="operatorId != null">
operator_id = #{operatorId,jdbcType=INTEGER},
</if>
<if test="operatorName != null">
operator_name = #{operatorName,jdbcType=VARCHAR},
</if>
</set>
where sms_package_record_id = #{smsPackageRecordId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabBillingSmsPackageRecord">
update tab_billing_sms_package_record
set product_name = #{productName,jdbcType=VARCHAR},
item_count = #{itemCount,jdbcType=INTEGER},
item_fee = #{itemFee,jdbcType=DOUBLE},
total_fee = #{totalFee,jdbcType=DOUBLE},
pay_type = #{payType,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
order_id = #{orderId,jdbcType=INTEGER},
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
discount_type = #{discountType,jdbcType=INTEGER},
card_name = #{cardName,jdbcType=VARCHAR},
card_amount = #{cardAmount,jdbcType=DOUBLE},
paid_fee = #{paidFee,jdbcType=DOUBLE},
operator_id = #{operatorId,jdbcType=INTEGER},
operator_name = #{operatorName,jdbcType=VARCHAR}
where sms_package_record_id = #{smsPackageRecordId,jdbcType=INTEGER}
</update>
<select id="listHomeStatistics" parameterType="com.gic.enterprise.qo.HomeStatisticsQO" resultType="com.gic.enterprise.dto.HomeStatisticsDTO">
select
DATE_FORMAT(deduction_time,'%Y-%m-%d') statisticsDate,
ifnull(sum(total_fee), 0) fee
from tab_billing_sms_package_record
where status = 1
and enterprise_id = #{enterpriseId}
and pay_type = 4
<if test="startTime != null">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
group by statisticsDate
</select>
<select id="getFee" resultType="double">
select
ifnull(sum(total_fee), 0)
from tab_billing_sms_package_record
where status = 1
and enterprise_id = #{enterpriseId}
and pay_type = 4
<if test="dateType == 1 ">
and date_format(deduction_time,'%Y-%m') = date_format(now(),'%Y-%m')
</if>
<if test="dateType == 2">
and date_format(deduction_time,'%Y-%m') = date_format(DATE_SUB(curdate(), INTERVAL 1 MONTH),'%Y-%m')
</if>
</select>
<select id="getTotalFee" resultType="double">
select
ifnull(sum(total_fee), 0)
from tab_billing_sms_package_record
where status = 1
and enterprise_id = #{enterpriseId}
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
</select>
<select id="listSmsPackageRecord" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_sms_package_record
<where>
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
<if test="payType != null ">
and pay_type = #{payType}
</if>
<if test="productName != null and productName != '' ">
and product_name like concat('%', #{productName}, '%' )
</if>
</where>
order by deduction_time desc
</select>
<select id="countSmsPackageRecord" resultType="int">
select
count(*)
from tab_billing_sms_package_record
<where>
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
<if test="payType != null ">
and pay_type = #{payType}
</if>
<if test="productName != null and productName != '' ">
and product_name like concat('%', #{productName}, '%' )
</if>
</where>
order by create_time desc
</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.TabBillingSmsRecordMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabBillingSmsRecord">
<id column="sms_record_id" jdbcType="BIGINT" property="smsRecordId" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="send_time" jdbcType="TIMESTAMP" property="sendTime" />
<result column="receive_phone" jdbcType="VARCHAR" property="receivePhone" />
<result column="pay_type" jdbcType="INTEGER" property="payType" />
<result column="app_code" jdbcType="VARCHAR" property="appCode" />
<result column="app_name" jdbcType="VARCHAR" property="appName" />
<result column="sms_type" jdbcType="INTEGER" property="smsType" />
<result column="bill_number" jdbcType="INTEGER" property="billNumber" />
<result column="fee" jdbcType="DOUBLE" property="fee" />
<result column="sms_content" jdbcType="VARCHAR" property="smsContent" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="deduction_time" jdbcType="TIMESTAMP" property="deductionTime" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="enterprise_sms_package_id" jdbcType="INTEGER" property="enterpriseSmsPackageId" />
<result column="ecu_id" jdbcType="BIGINT" property="ecuId" />
<result column="mcu_id" jdbcType="BIGINT" property="mcuId" />
<result column="member_card_id" jdbcType="BIGINT" property="memberCardId" />
<result column="member_card_name" jdbcType="VARCHAR" property="memberCardName" />
<result column="member_name" jdbcType="VARCHAR" property="memberName" />
<result column="store_brand_name" jdbcType="VARCHAR" property="storeBrandName" />
<result column="store_id" jdbcType="INTEGER" property="storeId" />
<result column="store_name" jdbcType="VARCHAR" property="storeName" />
<result column="store_group_id" jdbcType="INTEGER" property="storeGroupId" />
<result column="store_group_name" jdbcType="VARCHAR" property="storeGroupName" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="user_name" jdbcType="VARCHAR" property="userName" />
<result column="cache_status" jdbcType="INTEGER" property="cacheStatus" />
<result column="database_status" jdbcType="INTEGER" property="databaseStatus" />
</resultMap>
<sql id="Base_Column_List">
sms_record_id, status, send_time, receive_phone, pay_type, app_code, app_name, sms_type,
bill_number, fee, sms_content, create_time, update_time, deduction_time, enterprise_id,
enterprise_sms_package_id, ecu_id, mcu_id, member_card_id, member_card_name, member_name,
store_brand_name, store_id, store_name, store_group_id, store_group_name, user_id,
user_name, cache_status, database_status
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_sms_record
where sms_record_id = #{smsRecordId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from tab_billing_sms_record
where sms_record_id = #{smsRecordId,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingSmsRecord">
insert into tab_billing_sms_record (sms_record_id, status, send_time,
receive_phone, pay_type, app_code,
app_name, sms_type, bill_number,
fee, sms_content, create_time,
update_time, deduction_time, enterprise_id,
enterprise_sms_package_id, ecu_id, mcu_id,
member_card_id, member_card_name, member_name,
store_brand_name, store_id, store_name,
store_group_id, store_group_name, user_id,
user_name, cache_status, database_status
)
values (#{smsRecordId,jdbcType=BIGINT}, #{status,jdbcType=INTEGER}, #{sendTime,jdbcType=TIMESTAMP},
#{receivePhone,jdbcType=VARCHAR}, #{payType,jdbcType=INTEGER}, #{appCode,jdbcType=VARCHAR},
#{appName,jdbcType=VARCHAR}, #{smsType,jdbcType=INTEGER}, #{billNumber,jdbcType=INTEGER},
#{fee,jdbcType=DOUBLE}, #{smsContent,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{deductionTime,jdbcType=TIMESTAMP}, #{enterpriseId,jdbcType=INTEGER},
#{enterpriseSmsPackageId,jdbcType=INTEGER}, #{ecuId,jdbcType=BIGINT}, #{mcuId,jdbcType=BIGINT},
#{memberCardId,jdbcType=BIGINT}, #{memberCardName,jdbcType=VARCHAR}, #{memberName,jdbcType=VARCHAR},
#{storeBrandName,jdbcType=VARCHAR}, #{storeId,jdbcType=INTEGER}, #{storeName,jdbcType=VARCHAR},
#{storeGroupId,jdbcType=INTEGER}, #{storeGroupName,jdbcType=VARCHAR}, #{userId,jdbcType=INTEGER},
#{userName,jdbcType=VARCHAR}, #{cacheStatus,jdbcType=INTEGER}, #{databaseStatus,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingSmsRecord">
<!-- <selectKey keyProperty="smsRecordId" order="AFTER" resultType="java.lang.Long">-->
-- SELECT LAST_INSERT_ID()
<!-- </selectKey>-->
insert into tab_billing_sms_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="smsRecordId != null">
sms_record_id,
</if>
<if test="status != null">
status,
</if>
<if test="sendTime != null">
send_time,
</if>
<if test="receivePhone != null">
receive_phone,
</if>
<if test="payType != null">
pay_type,
</if>
<if test="appCode != null">
app_code,
</if>
<if test="appName != null">
app_name,
</if>
<if test="smsType != null">
sms_type,
</if>
<if test="billNumber != null">
bill_number,
</if>
<if test="fee != null">
fee,
</if>
<if test="smsContent != null">
sms_content,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="deductionTime != null">
deduction_time,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="enterpriseSmsPackageId != null">
enterprise_sms_package_id,
</if>
<if test="ecuId != null">
ecu_id,
</if>
<if test="mcuId != null">
mcu_id,
</if>
<if test="memberCardId != null">
member_card_id,
</if>
<if test="memberCardName != null">
member_card_name,
</if>
<if test="memberName != null">
member_name,
</if>
<if test="storeBrandName != null">
store_brand_name,
</if>
<if test="storeId != null">
store_id,
</if>
<if test="storeName != null">
store_name,
</if>
<if test="storeGroupId != null">
store_group_id,
</if>
<if test="storeGroupName != null">
store_group_name,
</if>
<if test="userId != null">
user_id,
</if>
<if test="userName != null">
user_name,
</if>
<if test="cacheStatus != null">
cache_status,
</if>
<if test="databaseStatus != null">
database_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="smsRecordId != null">
#{smsRecordId,jdbcType=BIGINT},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="sendTime != null">
#{sendTime,jdbcType=TIMESTAMP},
</if>
<if test="receivePhone != null">
#{receivePhone,jdbcType=VARCHAR},
</if>
<if test="payType != null">
#{payType,jdbcType=INTEGER},
</if>
<if test="appCode != null">
#{appCode,jdbcType=VARCHAR},
</if>
<if test="appName != null">
#{appName,jdbcType=VARCHAR},
</if>
<if test="smsType != null">
#{smsType,jdbcType=INTEGER},
</if>
<if test="billNumber != null">
#{billNumber,jdbcType=INTEGER},
</if>
<if test="fee != null">
#{fee,jdbcType=DOUBLE},
</if>
<if test="smsContent != null">
#{smsContent,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="deductionTime != null">
#{deductionTime,jdbcType=TIMESTAMP},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="enterpriseSmsPackageId != null">
#{enterpriseSmsPackageId,jdbcType=INTEGER},
</if>
<if test="ecuId != null">
#{ecuId,jdbcType=BIGINT},
</if>
<if test="mcuId != null">
#{mcuId,jdbcType=BIGINT},
</if>
<if test="memberCardId != null">
#{memberCardId,jdbcType=BIGINT},
</if>
<if test="memberCardName != null">
#{memberCardName,jdbcType=VARCHAR},
</if>
<if test="memberName != null">
#{memberName,jdbcType=VARCHAR},
</if>
<if test="storeBrandName != null">
#{storeBrandName,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
#{storeId,jdbcType=INTEGER},
</if>
<if test="storeName != null">
#{storeName,jdbcType=VARCHAR},
</if>
<if test="storeGroupId != null">
#{storeGroupId,jdbcType=INTEGER},
</if>
<if test="storeGroupName != null">
#{storeGroupName,jdbcType=VARCHAR},
</if>
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="userName != null">
#{userName,jdbcType=VARCHAR},
</if>
<if test="cacheStatus != null">
#{cacheStatus,jdbcType=INTEGER},
</if>
<if test="databaseStatus != null">
#{databaseStatus,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingSmsRecord">
update tab_billing_sms_record
<set>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="sendTime != null">
send_time = #{sendTime,jdbcType=TIMESTAMP},
</if>
<if test="receivePhone != null">
receive_phone = #{receivePhone,jdbcType=VARCHAR},
</if>
<if test="payType != null">
pay_type = #{payType,jdbcType=INTEGER},
</if>
<if test="appCode != null">
app_code = #{appCode,jdbcType=VARCHAR},
</if>
<if test="appName != null">
app_name = #{appName,jdbcType=VARCHAR},
</if>
<if test="smsType != null">
sms_type = #{smsType,jdbcType=INTEGER},
</if>
<if test="billNumber != null">
bill_number = #{billNumber,jdbcType=INTEGER},
</if>
<if test="fee != null">
fee = #{fee,jdbcType=DOUBLE},
</if>
<if test="smsContent != null">
sms_content = #{smsContent,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="deductionTime != null">
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="enterpriseSmsPackageId != null">
enterprise_sms_package_id = #{enterpriseSmsPackageId,jdbcType=INTEGER},
</if>
<if test="ecuId != null">
ecu_id = #{ecuId,jdbcType=BIGINT},
</if>
<if test="mcuId != null">
mcu_id = #{mcuId,jdbcType=BIGINT},
</if>
<if test="memberCardId != null">
member_card_id = #{memberCardId,jdbcType=BIGINT},
</if>
<if test="memberCardName != null">
member_card_name = #{memberCardName,jdbcType=VARCHAR},
</if>
<if test="memberName != null">
member_name = #{memberName,jdbcType=VARCHAR},
</if>
<if test="storeBrandName != null">
store_brand_name = #{storeBrandName,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
store_id = #{storeId,jdbcType=INTEGER},
</if>
<if test="storeName != null">
store_name = #{storeName,jdbcType=VARCHAR},
</if>
<if test="storeGroupId != null">
store_group_id = #{storeGroupId,jdbcType=INTEGER},
</if>
<if test="storeGroupName != null">
store_group_name = #{storeGroupName,jdbcType=VARCHAR},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="userName != null">
user_name = #{userName,jdbcType=VARCHAR},
</if>
<if test="cacheStatus != null">
cache_status = #{cacheStatus,jdbcType=INTEGER},
</if>
<if test="databaseStatus != null">
database_status = #{databaseStatus,jdbcType=INTEGER},
</if>
</set>
where sms_record_id = #{smsRecordId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabBillingSmsRecord">
update tab_billing_sms_record
set status = #{status,jdbcType=INTEGER},
send_time = #{sendTime,jdbcType=TIMESTAMP},
receive_phone = #{receivePhone,jdbcType=VARCHAR},
pay_type = #{payType,jdbcType=INTEGER},
app_code = #{appCode,jdbcType=VARCHAR},
app_name = #{appName,jdbcType=VARCHAR},
sms_type = #{smsType,jdbcType=INTEGER},
bill_number = #{billNumber,jdbcType=INTEGER},
fee = #{fee,jdbcType=DOUBLE},
sms_content = #{smsContent,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
enterprise_sms_package_id = #{enterpriseSmsPackageId,jdbcType=INTEGER},
ecu_id = #{ecuId,jdbcType=BIGINT},
mcu_id = #{mcuId,jdbcType=BIGINT},
member_card_id = #{memberCardId,jdbcType=BIGINT},
member_card_name = #{memberCardName,jdbcType=VARCHAR},
member_name = #{memberName,jdbcType=VARCHAR},
store_brand_name = #{storeBrandName,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=INTEGER},
store_name = #{storeName,jdbcType=VARCHAR},
store_group_id = #{storeGroupId,jdbcType=INTEGER},
store_group_name = #{storeGroupName,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=INTEGER},
user_name = #{userName,jdbcType=VARCHAR},
cache_status = #{cacheStatus,jdbcType=INTEGER},
database_status = #{databaseStatus,jdbcType=INTEGER}
where sms_record_id = #{smsRecordId,jdbcType=BIGINT}
</update>
<select id="listHomeStatistics" parameterType="com.gic.enterprise.qo.HomeStatisticsQO" resultType="com.gic.enterprise.dto.HomeStatisticsDTO">
select
DATE_FORMAT(deduction_time,'%Y-%m-%d') statisticsDate,
ifnull(sum(fee), 0) fee
from tab_billing_sms_record
where status = 1
and cache_status = 1
and database_status = 1
and enterprise_id = #{enterpriseId}
and pay_type = 4
<if test="startTime != null">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
group by statisticsDate
</select>
<select id="getFee" resultType="double">
select
ifnull(sum(fee), 0)
from tab_billing_sms_record
where status = 1
and cache_status = 1
and database_status = 1
and enterprise_id = #{enterpriseId}
and pay_type = 4
<if test="dateType == 1 ">
and date_format(deduction_time,'%Y-%m') = date_format(now(),'%Y-%m')
</if>
<if test="dateType == 2">
and date_format(deduction_time,'%Y-%m') = date_format(DATE_SUB(curdate(), INTERVAL 1 MONTH),'%Y-%m')
</if>
</select>
<select id="getTotalFee" resultType="double">
select
ifnull(sum(fee), 0)
from tab_billing_sms_record
where status = 1
and cache_status = 1
and database_status = 1
and enterprise_id = #{enterpriseId}
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
</select>
<select id="listSmsPackageRecord" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_sms_record
where status = 1
and cache_status = 1
and database_status = 1
and enterprise_sms_package_id=#{smsPackageId}
<if test="search != null ">
and sms_content like concat('%',#{search}, '%')
</if>
<if test="startDate != null and startDate != ''">
and create_time &gt;= concat(#{startDate},'00:00:00')
</if>
<if test="endDate != null and endDate != ''">
and create_time &lt;= concat(#{endDate}, '00:00:00')
</if>
order by create_time desc
</select>
<select id="listSmsRecord" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_sms_record
<where>
and enterprise_id = #{enterpriseId}
and cache_status = 1
and database_status = 1
<if test="startTime != null and startTime != '' ">
and deduction_time &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and deduction_time &lt;= #{endTime}
</if>
<if test="payType != null ">
and pay_type = #{payType}
</if>
<if test="appCode != null and appCode != '' ">
and app_code = #{appCode}
</if>
<if test="null != appCodeList and appCodeList.size > 0">
and app_code in
<foreach collection="appCodeList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="smsContent != null and smsContent != '' ">
and (sms_content like concat('%', #{smsContent}, '%') or receive_phone like concat('%', #{smsContent}, '%') )
</if>
<if test="smsType != null ">
and sms_type = #{smsType}
</if>
</where>
order by deduction_time desc
</select>
<select id="countSmsRecord" resultType="int">
select
count(*)
from tab_billing_sms_record
<where>
and cache_status = 1
and database_status = 1
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and DATE_FORMAT(deduction_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
<if test="payType != null ">
and pay_type = #{payType}
</if>
<if test="appCode != null ">
and app_code = #{appCode}
</if>
<if test="smsContent != null and smsContent != '' ">
and sms_content like concat('%', #{smsContent}, '%')
</if>
</where>
</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.TabBillingVoiceCodeRecordMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabBillingVoiceCodeRecord">
<id column="voice_code_record_id" jdbcType="INTEGER" property="voiceCodeRecordId" />
<result column="pay_serial_number" jdbcType="VARCHAR" property="paySerialNumber" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="send_time" jdbcType="TIMESTAMP" property="sendTime" />
<result column="receive_phone" jdbcType="VARCHAR" property="receivePhone" />
<result column="voice_time" jdbcType="VARCHAR" property="voiceTime" />
<result column="app_code" jdbcType="VARCHAR" property="appCode" />
<result column="app_name" jdbcType="VARCHAR" property="appName" />
<result column="fee" jdbcType="DOUBLE" property="fee" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="unit_fee" jdbcType="BIGINT" property="unitFee" />
<result column="deduction_time" jdbcType="TIMESTAMP" property="deductionTime" />
<result column="member_name" jdbcType="VARCHAR" property="memberName" />
<result column="store_id" jdbcType="INTEGER" property="storeId" />
<result column="store_name" jdbcType="VARCHAR" property="storeName" />
<result column="store_group_id" jdbcType="INTEGER" property="storeGroupId" />
<result column="store_group_name" jdbcType="VARCHAR" property="storeGroupName" />
</resultMap>
<sql id="Base_Column_List">
voice_code_record_id, pay_serial_number, status, send_time, receive_phone, voice_time,
app_code, app_name, fee, create_time, update_time, enterprise_id, unit_fee, deduction_time,
member_name, store_id, store_name, store_group_id, store_group_name
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_voice_code_record
where voice_code_record_id = #{voiceCodeRecordId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_billing_voice_code_record
where voice_code_record_id = #{voiceCodeRecordId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingVoiceCodeRecord">
insert into tab_billing_voice_code_record (voice_code_record_id, pay_serial_number,
status, send_time, receive_phone,
voice_time, app_code, app_name,
fee, create_time, update_time,
enterprise_id, unit_fee, deduction_time,
member_name, store_id, store_name,
store_group_id, store_group_name)
values (#{voiceCodeRecordId,jdbcType=INTEGER}, #{paySerialNumber,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{sendTime,jdbcType=TIMESTAMP}, #{receivePhone,jdbcType=VARCHAR},
#{voiceTime,jdbcType=VARCHAR}, #{appCode,jdbcType=VARCHAR}, #{appName,jdbcType=VARCHAR},
#{fee,jdbcType=DOUBLE}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{enterpriseId,jdbcType=INTEGER}, #{unitFee,jdbcType=BIGINT}, #{deductionTime,jdbcType=TIMESTAMP},
#{memberName,jdbcType=VARCHAR}, #{storeId,jdbcType=INTEGER}, #{storeName,jdbcType=VARCHAR},
#{storeGroupId,jdbcType=INTEGER}, #{storeGroupName,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingVoiceCodeRecord">
insert into tab_billing_voice_code_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="voiceCodeRecordId != null">
voice_code_record_id,
</if>
<if test="paySerialNumber != null">
pay_serial_number,
</if>
<if test="status != null">
status,
</if>
<if test="sendTime != null">
send_time,
</if>
<if test="receivePhone != null">
receive_phone,
</if>
<if test="voiceTime != null">
voice_time,
</if>
<if test="appCode != null">
app_code,
</if>
<if test="appName != null">
app_name,
</if>
<if test="fee != null">
fee,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="unitFee != null">
unit_fee,
</if>
<if test="deductionTime != null">
deduction_time,
</if>
<if test="memberName != null">
member_name,
</if>
<if test="storeId != null">
store_id,
</if>
<if test="storeName != null">
store_name,
</if>
<if test="storeGroupId != null">
store_group_id,
</if>
<if test="storeGroupName != null">
store_group_name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="voiceCodeRecordId != null">
#{voiceCodeRecordId,jdbcType=INTEGER},
</if>
<if test="paySerialNumber != null">
#{paySerialNumber,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="sendTime != null">
#{sendTime,jdbcType=TIMESTAMP},
</if>
<if test="receivePhone != null">
#{receivePhone,jdbcType=VARCHAR},
</if>
<if test="voiceTime != null">
#{voiceTime,jdbcType=VARCHAR},
</if>
<if test="appCode != null">
#{appCode,jdbcType=VARCHAR},
</if>
<if test="appName != null">
#{appName,jdbcType=VARCHAR},
</if>
<if test="fee != null">
#{fee,jdbcType=DOUBLE},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="unitFee != null">
#{unitFee,jdbcType=BIGINT},
</if>
<if test="deductionTime != null">
#{deductionTime,jdbcType=TIMESTAMP},
</if>
<if test="memberName != null">
#{memberName,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
#{storeId,jdbcType=INTEGER},
</if>
<if test="storeName != null">
#{storeName,jdbcType=VARCHAR},
</if>
<if test="storeGroupId != null">
#{storeGroupId,jdbcType=INTEGER},
</if>
<if test="storeGroupName != null">
#{storeGroupName,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingVoiceCodeRecord">
update tab_billing_voice_code_record
<set>
<if test="paySerialNumber != null">
pay_serial_number = #{paySerialNumber,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="sendTime != null">
send_time = #{sendTime,jdbcType=TIMESTAMP},
</if>
<if test="receivePhone != null">
receive_phone = #{receivePhone,jdbcType=VARCHAR},
</if>
<if test="voiceTime != null">
voice_time = #{voiceTime,jdbcType=VARCHAR},
</if>
<if test="appCode != null">
app_code = #{appCode,jdbcType=VARCHAR},
</if>
<if test="appName != null">
app_name = #{appName,jdbcType=VARCHAR},
</if>
<if test="fee != null">
fee = #{fee,jdbcType=DOUBLE},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="unitFee != null">
unit_fee = #{unitFee,jdbcType=BIGINT},
</if>
<if test="deductionTime != null">
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
</if>
<if test="memberName != null">
member_name = #{memberName,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
store_id = #{storeId,jdbcType=INTEGER},
</if>
<if test="storeName != null">
store_name = #{storeName,jdbcType=VARCHAR},
</if>
<if test="storeGroupId != null">
store_group_id = #{storeGroupId,jdbcType=INTEGER},
</if>
<if test="storeGroupName != null">
store_group_name = #{storeGroupName,jdbcType=VARCHAR},
</if>
</set>
where voice_code_record_id = #{voiceCodeRecordId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabBillingVoiceCodeRecord">
update tab_billing_voice_code_record
set pay_serial_number = #{paySerialNumber,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
send_time = #{sendTime,jdbcType=TIMESTAMP},
receive_phone = #{receivePhone,jdbcType=VARCHAR},
voice_time = #{voiceTime,jdbcType=VARCHAR},
app_code = #{appCode,jdbcType=VARCHAR},
app_name = #{appName,jdbcType=VARCHAR},
fee = #{fee,jdbcType=DOUBLE},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
unit_fee = #{unitFee,jdbcType=BIGINT},
deduction_time = #{deductionTime,jdbcType=TIMESTAMP},
member_name = #{memberName,jdbcType=VARCHAR},
store_id = #{storeId,jdbcType=INTEGER},
store_name = #{storeName,jdbcType=VARCHAR},
store_group_id = #{storeGroupId,jdbcType=INTEGER},
store_group_name = #{storeGroupName,jdbcType=VARCHAR}
where voice_code_record_id = #{voiceCodeRecordId,jdbcType=INTEGER}
</update>
<select id="listHomeStatistics" parameterType="com.gic.enterprise.qo.HomeStatisticsQO" resultType="com.gic.enterprise.dto.HomeStatisticsDTO">
select
DATE_FORMAT(send_time,'%Y-%m-%d') statisticsDate,
ifnull(sum(fee), 0) fee
from tab_billing_voice_code_record
where status = 1
and enterprise_id = #{enterpriseId}
<if test="startTime != null">
and DATE_FORMAT(send_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null">
and DATE_FORMAT(send_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
group by statisticsDate
</select>
<select id="getFee" resultType="double">
select
ifnull(sum(fee), 0)
from tab_billing_voice_code_record
where status = 1
and enterprise_id = #{enterpriseId}
<if test="dateType == 1 ">
and date_format(send_time,'%Y-%m') = date_format(now(),'%Y-%m')
</if>
<if test="dateType == 2">
and date_format(send_time,'%Y-%m') = date_format(DATE_SUB(curdate(), INTERVAL 1 MONTH),'%Y-%m')
</if>
</select>
<select id="getTotalFee" resultType="double">
select
ifnull(sum(fee), 0)
from tab_billing_voice_code_record
where status = 1
and enterprise_id = #{enterpriseId}
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(send_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and DATE_FORMAT(send_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
</select>
<select id="listVoiceCodeRecord" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_voice_code_record
<where>
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(send_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and DATE_FORMAT(send_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
<if test="phone != null and phone != '' ">
and receive_phone like concat('%', #{phone} ,'%')
</if>
</where>
order by create_time desc
</select>
<select id="countVoiceCodeRecord" resultType="int">
select
count(*)
from tab_billing_voice_code_record
<where>
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(send_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and startTime != '' ">
and DATE_FORMAT(send_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
<if test="phone != null and phone != '' ">
and receive_phone like concat('%', #{phone} ,'%')
</if>
</where>
</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.TabConfigRuleMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabConfigRule">
<id column="rule_id" jdbcType="INTEGER" property="ruleId" />
<result column="rule_name" jdbcType="VARCHAR" property="ruleName" />
<result column="app_name" jdbcType="VARCHAR" property="appName" />
<result column="app_code" jdbcType="VARCHAR" property="appCode" />
<result column="classify_icon" jdbcType="VARCHAR" property="classifyIcon" />
<result column="rule_desc" jdbcType="VARCHAR" property="ruleDesc" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="market_name" jdbcType="VARCHAR" property="marketName" />
<result column="market_scene" jdbcType="VARCHAR" property="marketScene" />
<result column="market_object" jdbcType="INTEGER" property="marketObject" />
<result column="parent_rule_id" jdbcType="INTEGER" property="parentRuleId" />
<result column="rule_level" jdbcType="INTEGER" property="ruleLevel" />
<result column="rule_chain" jdbcType="VARCHAR" property="ruleChain" />
<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_id, rule_name, app_name, app_code, classify_icon, rule_desc, remark, market_name, market_scene, market_object,
parent_rule_id, rule_level, rule_chain, status, create_time, update_time
</sql>
<sql id="Base_Column_List_alias">
${alias}.rule_id, ${alias}.rule_name, ${alias}.app_name, ${alias}.app_code, ${alias}.classify_icon,
${alias}.rule_desc, ${alias}.remark, ${alias}.market_name, ${alias}.market_scene, ${alias}.market_object,
${alias}.parent_rule_id, ${alias}.rule_level, ${alias}.rule_chain, ${alias}.status, ${alias}.create_time, ${alias}.update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_config_rule
where rule_id = #{ruleId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_config_rule
where rule_id = #{ruleId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabConfigRule">
insert into tab_config_rule (rule_id, rule_name, app_name,
app_code, classify_icon, rule_desc,
remark, market_name, market_scene, market_object,
parent_rule_id, rule_level, rule_chain,
status, create_time, update_time
)
values (#{ruleId,jdbcType=INTEGER}, #{ruleName,jdbcType=VARCHAR}, #{appName,jdbcType=VARCHAR},
#{appCode,jdbcType=VARCHAR}, #{classifyIcon,jdbcType=VARCHAR}, #{ruleDesc,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{marketName,jdbcType=VARCHAR}, #{marketScene,jdbcType=VARCHAR}, #{marketObject,jdbcType=INTEGER},
#{parentRuleId,jdbcType=INTEGER}, #{ruleLevel,jdbcType=INTEGER}, #{ruleChain,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabConfigRule" useGeneratedKeys="true" keyProperty="ruleId">
insert into tab_config_rule
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="ruleId != null">
rule_id,
</if>
<if test="ruleName != null">
rule_name,
</if>
<if test="appName != null">
app_name,
</if>
<if test="appCode != null">
app_code,
</if>
<if test="classifyIcon != null">
classify_icon,
</if>
<if test="ruleDesc != null">
rule_desc,
</if>
<if test="remark != null">
remark,
</if>
<if test="marketName != null">
market_name,
</if>
<if test="marketScene != null">
market_scene,
</if>
<if test="marketObject != null">
market_object,
</if>
<if test="parentRuleId != null">
parent_rule_id,
</if>
<if test="ruleLevel != null">
rule_level,
</if>
<if test="ruleChain != null">
rule_chain,
</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="ruleId != null">
#{ruleId,jdbcType=INTEGER},
</if>
<if test="ruleName != null">
#{ruleName,jdbcType=VARCHAR},
</if>
<if test="appName != null">
#{appName,jdbcType=VARCHAR},
</if>
<if test="appCode != null">
#{appCode,jdbcType=VARCHAR},
</if>
<if test="classifyIcon != null">
#{classifyIcon,jdbcType=VARCHAR},
</if>
<if test="ruleDesc != null">
#{ruleDesc,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="marketName != null">
#{marketName,jdbcType=VARCHAR},
</if>
<if test="marketScene != null">
#{marketScene,jdbcType=VARCHAR},
</if>
<if test="marketObject != null">
#{marketObject,jdbcType=INTEGER},
</if>
<if test="parentRuleId != null">
#{parentRuleId,jdbcType=INTEGER},
</if>
<if test="ruleLevel != null">
#{ruleLevel,jdbcType=INTEGER},
</if>
<if test="ruleChain != null">
#{ruleChain,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.TabConfigRule">
update tab_config_rule
<set>
<if test="ruleName != null">
rule_name = #{ruleName,jdbcType=VARCHAR},
</if>
<if test="appName != null">
app_name = #{appName,jdbcType=VARCHAR},
</if>
<if test="appCode != null">
app_code = #{appCode,jdbcType=VARCHAR},
</if>
<if test="classifyIcon != null">
classify_icon = #{classifyIcon,jdbcType=VARCHAR},
</if>
<if test="ruleDesc != null">
rule_desc = #{ruleDesc,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="marketName != null">
market_name = #{marketName,jdbcType=VARCHAR},
</if>
<if test="marketScene != null">
market_scene = #{marketScene,jdbcType=VARCHAR},
</if>
<if test="marketObject != null">
market_object = #{marketObject,jdbcType=INTEGER},
</if>
<if test="parentRuleId != null">
parent_rule_id = #{parentRuleId,jdbcType=INTEGER},
</if>
<if test="ruleLevel != null">
rule_level = #{ruleLevel,jdbcType=INTEGER},
</if>
<if test="ruleChain != null">
rule_chain = #{ruleChain,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 rule_id = #{ruleId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabConfigRule">
update tab_config_rule
set rule_name = #{ruleName,jdbcType=VARCHAR},
app_name = #{appName,jdbcType=VARCHAR},
app_code = #{appCode,jdbcType=VARCHAR},
classify_icon = #{classifyIcon,jdbcType=VARCHAR},
rule_desc = #{ruleDesc,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
market_name = #{marketName,jdbcType=VARCHAR},
market_scene = #{marketScene,jdbcType=VARCHAR},
market_object = #{marketObject,jdbcType=INTEGER},
parent_rule_id = #{parentRuleId,jdbcType=INTEGER},
rule_level = #{ruleLevel,jdbcType=INTEGER},
rule_chain = #{ruleChain,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where rule_id = #{ruleId,jdbcType=INTEGER}
</update>
<select id="countRepeatName" resultType="int">
select count(1) from tab_config_rule
where status = 1
and rule_level = #{ruleLevel}
and rule_name = #{name}
<if test="ruleLevel == 1">
<if test="ruleId != null">
and rule_id &lt;&gt; #{ruleId}
</if>
</if>
<if test="ruleLevel != 1">
and parent_rule_id = #{parentRuleId}
<if test="ruleId != null">
and rule_id &lt;&gt; #{ruleId}
</if>
</if>
</select>
<select id="countRepeatAppCode" resultType="int">
select count(1) from tab_config_rule
where status = 1
and app_code = #{appCode}
and rule_level = 1
<if test="ruleId != null">
and rule_id &lt;&gt; #{ruleId}
</if>
</select>
<select id="listRule" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_config_rule
where status = 1
and rule_level = #{ruleLevel}
<if test="ruleLevel != 1 ">
and parent_rule_id = #{ruleId}
</if>
<if test="search != null and search != '' ">
and ( rule_name like concat('%', #{search}, '%') )
</if>
order by create_time desc
</select>
<select id="listAll" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_config_rule
where status = 1
<if test="ruleId != null">
and parent_rule_id = #{ruleId}
</if>
</select>
<select id="getRuleTreeByName" resultMap="BaseResultMap">
select <include refid="Base_Column_List_alias"><property name="alias" value="t2"></property></include>
from
(
SELECT
rule_chain
FROM
tab_config_rule
WHERE
STATUS = 1
AND ( rule_name LIKE concat('%', #{search}, '%') or app_name like concat('%', #{search}, '%') )
) t1,
(
SELECT
*
FROM
tab_config_rule
WHERE
STATUS = 1
) t2
where t1.rule_chain LIKE concat('%', t2.rule_chain, '%')
</select>
<select id="getByAppCode" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_config_rule
where status = 1
and app_code = #{appCode}
</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.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
<?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.TabDataMemberConsumeConfigMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabDataMemberConsumeConfig">
<id column="member_consume_config_id" jdbcType="INTEGER" property="memberConsumeConfigId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="member_consume_count" jdbcType="INTEGER" property="memberConsumeCount" />
<result column="member_consume_max_default" jdbcType="INTEGER" property="memberConsumeMaxDefault" />
<result column="member_consume_times_default" jdbcType="INTEGER" property="memberConsumeTimesDefault" />
<result column="member_consume_max_goods" jdbcType="INTEGER" property="memberConsumeMaxGoods" />
<result column="member_consume_times_goods" jdbcType="INTEGER" property="memberConsumeTimesGoods" />
<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">
member_consume_config_id, enterprise_id, member_consume_count, member_consume_max_default, member_consume_times_default,
member_consume_max_goods, member_consume_times_goods, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_data_member_consume_config
where member_consume_config_id = #{memberConsumeConfigId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_data_member_consume_config
where member_consume_config_id = #{memberConsumeConfigId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabDataMemberConsumeConfig">
insert into tab_data_member_consume_config (member_consume_config_id, enterprise_id,
member_consume_count, member_consume_max_default, member_consume_times_default,
member_consume_max_goods, member_consume_times_goods,
status, create_time, update_time
)
values (#{memberConsumeConfigId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
#{memberConsumeCount,jdbcType=INTEGER}, #{memberConsumeMaxDefault,jdbcType=INTEGER}, #{memberConsumeTimesDefault,jdbcType=INTEGER},
#{memberConsumeMaxGoods,jdbcType=INTEGER}, #{memberConsumeTimesGoods,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabDataMemberConsumeConfig" useGeneratedKeys="true" keyProperty="memberConsumeConfigId">
insert into tab_data_member_consume_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="memberConsumeConfigId != null">
member_consume_config_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="memberConsumeCount != null">
member_consume_count,
</if>
<if test="memberConsumeMaxDefault != null">
member_consume_max_default,
</if>
<if test="memberConsumeTimesDefault != null">
member_consume_times_default,
</if>
<if test="memberConsumeMaxGoods != null">
member_consume_max_goods,
</if>
<if test="memberConsumeTimesGoods != null">
member_consume_times_goods,
</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="memberConsumeConfigId != null">
#{memberConsumeConfigId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="memberConsumeCount != null">
#{memberConsumeCount,jdbcType=INTEGER},
</if>
<if test="memberConsumeMaxDefault != null">
#{memberConsumeMaxDefault,jdbcType=INTEGER},
</if>
<if test="memberConsumeTimesDefault != null">
#{memberConsumeTimesDefault,jdbcType=INTEGER},
</if>
<if test="memberConsumeMaxGoods != null">
#{memberConsumeMaxGoods,jdbcType=INTEGER},
</if>
<if test="memberConsumeTimesGoods != null">
#{memberConsumeTimesGoods,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.TabDataMemberConsumeConfig">
update tab_data_member_consume_config
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="memberConsumeCount != null">
member_consume_count = #{memberConsumeCount,jdbcType=INTEGER},
</if>
<if test="memberConsumeMaxDefault != null">
member_consume_max_default = #{memberConsumeMaxDefault,jdbcType=INTEGER},
</if>
<if test="memberConsumeTimesDefault != null">
member_consume_times_default = #{memberConsumeTimesDefault,jdbcType=INTEGER},
</if>
<if test="memberConsumeMaxGoods != null">
member_consume_max_goods = #{memberConsumeMaxGoods,jdbcType=INTEGER},
</if>
<if test="memberConsumeTimesGoods != null">
member_consume_times_goods = #{memberConsumeTimesGoods,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 member_consume_config_id = #{memberConsumeConfigId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabDataMemberConsumeConfig">
update tab_data_member_consume_config
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
member_consume_count = #{memberConsumeCount,jdbcType=INTEGER},
member_consume_max_default = #{memberConsumeMaxDefault,jdbcType=INTEGER},
member_consume_times_default = #{memberConsumeTimesDefault,jdbcType=INTEGER},
member_consume_max_goods = #{memberConsumeMaxGoods,jdbcType=INTEGER},
member_consume_times_goods = #{memberConsumeTimesGoods,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where member_consume_config_id = #{memberConsumeConfigId,jdbcType=INTEGER}
</update>
<select id="getByEnterpriseId" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_data_member_consume_config
where status = 1
and enterprise_id = #{enterpriseId}
</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.TabDataPerformanceConfigMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabDataPerformanceConfig">
<id column="performance_config_id" jdbcType="INTEGER" property="performanceConfigId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="order_number" jdbcType="INTEGER" property="orderNumber" />
<result column="order_people_number" jdbcType="INTEGER" property="orderPeopleNumber" />
<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">
performance_config_id, enterprise_id, order_number, order_people_number, status,
create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_data_performance_config
where performance_config_id = #{performanceConfigId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_data_performance_config
where performance_config_id = #{performanceConfigId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabDataPerformanceConfig">
insert into tab_data_performance_config (performance_config_id, enterprise_id,
order_number, order_people_number, status,
create_time, update_time)
values (#{performanceConfigId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
#{orderNumber,jdbcType=INTEGER}, #{orderPeopleNumber,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabDataPerformanceConfig">
insert into tab_data_performance_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="performanceConfigId != null">
performance_config_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="orderNumber != null">
order_number,
</if>
<if test="orderPeopleNumber != null">
order_people_number,
</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="performanceConfigId != null">
#{performanceConfigId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="orderNumber != null">
#{orderNumber,jdbcType=INTEGER},
</if>
<if test="orderPeopleNumber != null">
#{orderPeopleNumber,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.TabDataPerformanceConfig">
update tab_data_performance_config
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="orderNumber != null">
order_number = #{orderNumber,jdbcType=INTEGER},
</if>
<if test="orderPeopleNumber != null">
order_people_number = #{orderPeopleNumber,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 performance_config_id = #{performanceConfigId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabDataPerformanceConfig">
update tab_data_performance_config
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
order_number = #{orderNumber,jdbcType=INTEGER},
order_people_number = #{orderPeopleNumber,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where performance_config_id = #{performanceConfigId,jdbcType=INTEGER}
</update>
<select id="getByEnterpriseId" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_data_performance_config
where enterprise_id = #{enterpriseId}
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.TabDataSingleEffectConfigMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabDataSingleEffectConfig">
<id column="single_effect_config_id" jdbcType="INTEGER" property="singleEffectConfigId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="order_grain" jdbcType="INTEGER" property="orderGrain" />
<result column="sale" jdbcType="INTEGER" property="sale" />
<result column="tag" jdbcType="INTEGER" property="tag" />
<result column="order_number" jdbcType="INTEGER" property="orderNumber" />
<result column="sale_number" jdbcType="INTEGER" property="saleNumber" />
<result column="sale_number_target" jdbcType="INTEGER" property="saleNumberTarget" />
<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">
single_effect_config_id, enterprise_id, order_grain, sale, tag, order_number, sale_number, sale_number_target,
status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_data_single_effect_config
where single_effect_config_id = #{singleEffectConfigId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_data_single_effect_config
where single_effect_config_id = #{singleEffectConfigId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabDataSingleEffectConfig">
insert into tab_data_single_effect_config (single_effect_config_id, enterprise_id, order_grain,
sale, tag, order_number, sale_number,
sale_number_target, status, create_time,
update_time)
values (#{singleEffectConfigId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{orderGrain,jdbcType=INTEGER},
#{sale,jdbcType=INTEGER}, #{tag,jdbcType=INTEGER}, #{orderNumber,jdbcType=INTEGER}, #{saleNumber,jdbcType=INTEGER},
#{saleNumberTarget,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabDataSingleEffectConfig">
insert into tab_data_single_effect_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="singleEffectConfigId != null">
single_effect_config_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="orderGrain != null">
order_grain,
</if>
<if test="sale != null">
sale,
</if>
<if test="tag != null">
tag,
</if>
<if test="orderNumber != null">
order_number,
</if>
<if test="saleNumber != null">
sale_number,
</if>
<if test="saleNumberTarget != null">
sale_number_target,
</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="singleEffectConfigId != null">
#{singleEffectConfigId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="orderGrain != null">
#{orderGrain,jdbcType=INTEGER},
</if>
<if test="sale != null">
#{sale,jdbcType=INTEGER},
</if>
<if test="tag != null">
#{tag,jdbcType=INTEGER},
</if>
<if test="orderNumber != null">
#{orderNumber,jdbcType=INTEGER},
</if>
<if test="saleNumber != null">
#{saleNumber,jdbcType=INTEGER},
</if>
<if test="saleNumberTarget != null">
#{saleNumberTarget,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.TabDataSingleEffectConfig">
update tab_data_single_effect_config
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="orderGrain != null">
order_grain = #{orderGrain,jdbcType=INTEGER},
</if>
<if test="sale != null">
sale = #{sale,jdbcType=INTEGER},
</if>
<if test="tag != null">
tag = #{tag,jdbcType=INTEGER},
</if>
<if test="orderNumber != null">
order_number = #{orderNumber,jdbcType=INTEGER},
</if>
<if test="saleNumber != null">
sale_number = #{saleNumber,jdbcType=INTEGER},
</if>
<if test="saleNumberTarget != null">
sale_number_target = #{saleNumberTarget,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 single_effect_config_id = #{singleEffectConfigId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabDataSingleEffectConfig">
update tab_data_single_effect_config
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
order_grain = #{orderGrain,jdbcType=INTEGER},
sale = #{sale,jdbcType=INTEGER},
tag = #{tag,jdbcType=INTEGER},
order_number = #{orderNumber,jdbcType=INTEGER},
sale_number = #{saleNumber,jdbcType=INTEGER},
sale_number_target = #{saleNumberTarget,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where single_effect_config_id = #{singleEffectConfigId,jdbcType=INTEGER}
</update>
<select id="getByEnterpriseId" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_data_single_effect_config
where enterprise_id = #{enterpriseId}
and status = 1
order by order_grain
</select>
<update id="deleteSingleEffectConfig">
update tab_data_single_effect_config set status = 0
where enterprise_id = #{enterpriseId}
and order_grain = #{orderGrain}
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.TabDataWechatMemberConfigMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabDataWechatMemberConfig">
<id column="wechat_member_config_id" jdbcType="INTEGER" property="wechatMemberConfigId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="member_card_area" jdbcType="VARCHAR" property="memberCardArea" />
<result column="relate_service" jdbcType="VARCHAR" property="relateService" />
<result column="relate_wechat" jdbcType="VARCHAR" property="relateWechat" />
<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">
wechat_member_config_id, enterprise_id, member_card_area, relate_service, relate_wechat,
status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_data_wechat_member_config
where wechat_member_config_id = #{wechatMemberConfigId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_data_wechat_member_config
where wechat_member_config_id = #{wechatMemberConfigId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabDataWechatMemberConfig" useGeneratedKeys="true" keyProperty="wechatMemberConfigId">
insert into tab_data_wechat_member_config (wechat_member_config_id, enterprise_id,
member_card_area, relate_service, relate_wechat,
status, create_time, update_time
)
values (#{wechatMemberConfigId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
#{memberCardArea,jdbcType=VARCHAR}, #{relateService,jdbcType=VARCHAR}, #{relateWechat,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabDataWechatMemberConfig">
insert into tab_data_wechat_member_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="wechatMemberConfigId != null">
wechat_member_config_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="memberCardArea != null">
member_card_area,
</if>
<if test="relateService != null">
relate_service,
</if>
<if test="relateWechat != null">
relate_wechat,
</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="wechatMemberConfigId != null">
#{wechatMemberConfigId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="memberCardArea != null">
#{memberCardArea,jdbcType=VARCHAR},
</if>
<if test="relateService != null">
#{relateService,jdbcType=VARCHAR},
</if>
<if test="relateWechat != null">
#{relateWechat,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.TabDataWechatMemberConfig">
update tab_data_wechat_member_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="relateService != null">
relate_service = #{relateService,jdbcType=VARCHAR},
</if>
<if test="relateWechat != null">
relate_wechat = #{relateWechat,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 wechat_member_config_id = #{wechatMemberConfigId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabDataWechatMemberConfig">
update tab_data_wechat_member_config
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
member_card_area = #{memberCardArea,jdbcType=VARCHAR},
relate_service = #{relateService,jdbcType=VARCHAR},
relate_wechat = #{relateWechat,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where wechat_member_config_id = #{wechatMemberConfigId,jdbcType=INTEGER}
</update>
<select id="getByMemberCardId" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_data_wechat_member_config
where enterprise_id = #{enterpriseId}
and member_card_area = #{memberCardId}
and status = 1
</select>
<select id="listByEnterpriseId" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
from tab_data_wechat_member_config
where enterprise_id = #{enterpriseId}
and status = 1
order by create_time desc
</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.TabDownloadLogMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabDownloadLog">
<id column="download_log_id" jdbcType="INTEGER" property="downloadLogId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="report_id" jdbcType="VARCHAR" property="reportId" />
<result column="download_report_id" jdbcType="INTEGER" property="downloadReportId" />
<result column="file_name" jdbcType="VARCHAR" property="fileName" />
<result column="data_content" jdbcType="VARCHAR" property="dataContent" />
<result column="data_type" jdbcType="INTEGER" property="dataType" />
<result column="data_count" jdbcType="INTEGER" property="dataCount" />
<result column="download_user_id" jdbcType="INTEGER" property="downloadUserId" />
<result column="download_user_name" jdbcType="VARCHAR" property="downloadUserName" />
<result column="download_time" jdbcType="TIMESTAMP" property="downloadTime" />
<result column="project_code" jdbcType="VARCHAR" property="projectCode" />
<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">
download_log_id, enterprise_id, report_id, download_report_id, file_name, data_content,
data_type, data_count, download_user_id, download_user_name, download_time, project_code,
status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_download_log
where download_log_id = #{downloadLogId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_download_log
where download_log_id = #{downloadLogId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabDownloadLog">
insert into tab_download_log (download_log_id, enterprise_id, report_id,
download_report_id, file_name, data_content,
data_type, data_count, download_user_id,
download_user_name, download_time, project_code,
status, create_time, update_time
)
values (#{downloadLogId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{reportId,jdbcType=VARCHAR},
#{downloadReportId,jdbcType=INTEGER}, #{fileName,jdbcType=VARCHAR}, #{dataContent,jdbcType=VARCHAR},
#{dataType,jdbcType=INTEGER}, #{dataCount,jdbcType=INTEGER}, #{downloadUserId,jdbcType=INTEGER},
#{downloadUserName,jdbcType=VARCHAR}, #{downloadTime,jdbcType=TIMESTAMP}, #{projectCode,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabDownloadLog">
insert into tab_download_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="downloadLogId != null">
download_log_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="reportId != null">
report_id,
</if>
<if test="downloadReportId != null">
download_report_id,
</if>
<if test="fileName != null">
file_name,
</if>
<if test="dataContent != null">
data_content,
</if>
<if test="dataType != null">
data_type,
</if>
<if test="dataCount != null">
data_count,
</if>
<if test="downloadUserId != null">
download_user_id,
</if>
<if test="downloadUserName != null">
download_user_name,
</if>
<if test="downloadTime != null">
download_time,
</if>
<if test="projectCode != null">
project_code,
</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="downloadLogId != null">
#{downloadLogId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="reportId != null">
#{reportId,jdbcType=VARCHAR},
</if>
<if test="downloadReportId != null">
#{downloadReportId,jdbcType=INTEGER},
</if>
<if test="fileName != null">
#{fileName,jdbcType=VARCHAR},
</if>
<if test="dataContent != null">
#{dataContent,jdbcType=VARCHAR},
</if>
<if test="dataType != null">
#{dataType,jdbcType=INTEGER},
</if>
<if test="dataCount != null">
#{dataCount,jdbcType=INTEGER},
</if>
<if test="downloadUserId != null">
#{downloadUserId,jdbcType=INTEGER},
</if>
<if test="downloadUserName != null">
#{downloadUserName,jdbcType=VARCHAR},
</if>
<if test="downloadTime != null">
#{downloadTime,jdbcType=TIMESTAMP},
</if>
<if test="projectCode != null">
#{projectCode,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.TabDownloadLog">
update tab_download_log
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="reportId != null">
report_id = #{reportId,jdbcType=VARCHAR},
</if>
<if test="downloadReportId != null">
download_report_id = #{downloadReportId,jdbcType=INTEGER},
</if>
<if test="fileName != null">
file_name = #{fileName,jdbcType=VARCHAR},
</if>
<if test="dataContent != null">
data_content = #{dataContent,jdbcType=VARCHAR},
</if>
<if test="dataType != null">
data_type = #{dataType,jdbcType=INTEGER},
</if>
<if test="dataCount != null">
data_count = #{dataCount,jdbcType=INTEGER},
</if>
<if test="downloadUserId != null">
download_user_id = #{downloadUserId,jdbcType=INTEGER},
</if>
<if test="downloadUserName != null">
download_user_name = #{downloadUserName,jdbcType=VARCHAR},
</if>
<if test="downloadTime != null">
download_time = #{downloadTime,jdbcType=TIMESTAMP},
</if>
<if test="projectCode != null">
project_code = #{projectCode,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 download_log_id = #{downloadLogId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabDownloadLog">
update tab_download_log
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
report_id = #{reportId,jdbcType=VARCHAR},
download_report_id = #{downloadReportId,jdbcType=INTEGER},
file_name = #{fileName,jdbcType=VARCHAR},
data_content = #{dataContent,jdbcType=VARCHAR},
data_type = #{dataType,jdbcType=INTEGER},
data_count = #{dataCount,jdbcType=INTEGER},
download_user_id = #{downloadUserId,jdbcType=INTEGER},
download_user_name = #{downloadUserName,jdbcType=VARCHAR},
download_time = #{downloadTime,jdbcType=TIMESTAMP},
project_code = #{projectCode,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where download_log_id = #{downloadLogId,jdbcType=INTEGER}
</update>
<select id="listDownload" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_download_log
where status = 1
<if test="startTime != null and startTime != '' ">
and create_time &gt; #{startTime}
</if>
<if test="endTime != null and endTime != '' ">
and create_time &gt; #{endTime}
</if>
<if test="dataType != null ">
and data_type = #{dataType}
</if>
<if test="search != null and search != '' ">
and (
report_id like concat('%', #{search}, '%')
or file_name like concat('%', #{search}, '%')
or data_content like concat('%', #{search}, '%')
or download_user_name like concat('%', #{search}, '%')
)
</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.TabDownloadReportMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabDownloadReport">
<id column="download_report_id" jdbcType="INTEGER" property="downloadReportId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="report_id" jdbcType="VARCHAR" property="reportId" />
<result column="apply_user_id" jdbcType="INTEGER" property="applyUserId" />
<result column="apply_user_name" jdbcType="VARCHAR" property="applyUserName" />
<result column="report_start_time" jdbcType="TIMESTAMP" property="reportStartTime" />
<result column="report_end_time" jdbcType="TIMESTAMP" property="reportEndTime" />
<result column="file_name" jdbcType="VARCHAR" property="fileName" />
<result column="data_content" jdbcType="VARCHAR" property="dataContent" />
<result column="data_url" jdbcType="VARCHAR" property="dataUrl" />
<result column="data_type" jdbcType="INTEGER" property="dataType" />
<result column="data_count" jdbcType="INTEGER" property="dataCount" />
<result column="audit_result" jdbcType="INTEGER" property="auditResult" />
<result column="audit_expire_time" jdbcType="TIMESTAMP" property="auditExpireTime" />
<result column="download_url" jdbcType="VARCHAR" property="downloadUrl" />
<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="auditor_id" jdbcType="INTEGER" property="auditorId" />
<result column="auditor_name" jdbcType="VARCHAR" property="auditorName" />
<result column="auditor_phone" jdbcType="VARCHAR" property="auditorPhone" />
<result column="audit_reason" jdbcType="VARCHAR" property="auditReason" />
<result column="project_code" jdbcType="VARCHAR" property="projectCode" />
</resultMap>
<sql id="Base_Column_List">
download_report_id, enterprise_id, report_id, apply_user_id, apply_user_name, report_start_time,
report_end_time, file_name, data_content, data_url, data_type, data_count, audit_result,
audit_expire_time, download_url, status, create_time, update_time, auditor_id, auditor_name,
auditor_phone, audit_reason, project_code
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_download_report
where download_report_id = #{downloadReportId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_download_report
where download_report_id = #{downloadReportId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabDownloadReport">
insert into tab_download_report (download_report_id, enterprise_id, report_id,
apply_user_id, apply_user_name, report_start_time,
report_end_time, file_name, data_content,
data_url, data_type, data_count,
audit_result, audit_expire_time, download_url,
status, create_time, update_time,
auditor_id, auditor_name, auditor_phone,
audit_reason, project_code)
values (#{downloadReportId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{reportId,jdbcType=VARCHAR},
#{applyUserId,jdbcType=INTEGER}, #{applyUserName,jdbcType=VARCHAR}, #{reportStartTime,jdbcType=TIMESTAMP},
#{reportEndTime,jdbcType=TIMESTAMP}, #{fileName,jdbcType=VARCHAR}, #{dataContent,jdbcType=VARCHAR},
#{dataUrl,jdbcType=VARCHAR}, #{dataType,jdbcType=INTEGER}, #{dataCount,jdbcType=INTEGER},
#{auditResult,jdbcType=INTEGER}, #{auditExpireTime,jdbcType=TIMESTAMP}, #{downloadUrl,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{auditorId,jdbcType=INTEGER}, #{auditorName,jdbcType=VARCHAR}, #{auditorPhone,jdbcType=VARCHAR},
#{auditReason,jdbcType=VARCHAR}, #{projectCode,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabDownloadReport">
<selectKey keyProperty="downloadReportId" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_download_report
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="downloadReportId != null">
download_report_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="reportId != null">
report_id,
</if>
<if test="applyUserId != null">
apply_user_id,
</if>
<if test="applyUserName != null">
apply_user_name,
</if>
<if test="reportStartTime != null">
report_start_time,
</if>
<if test="reportEndTime != null">
report_end_time,
</if>
<if test="fileName != null">
file_name,
</if>
<if test="dataContent != null">
data_content,
</if>
<if test="dataUrl != null">
data_url,
</if>
<if test="dataType != null">
data_type,
</if>
<if test="dataCount != null">
data_count,
</if>
<if test="auditResult != null">
audit_result,
</if>
<if test="auditExpireTime != null">
audit_expire_time,
</if>
<if test="downloadUrl != null">
download_url,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="auditorId != null">
auditor_id,
</if>
<if test="auditorName != null">
auditor_name,
</if>
<if test="auditorPhone != null">
auditor_phone,
</if>
<if test="auditReason != null">
audit_reason,
</if>
<if test="projectCode != null">
project_code,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="downloadReportId != null">
#{downloadReportId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="reportId != null">
#{reportId,jdbcType=VARCHAR},
</if>
<if test="applyUserId != null">
#{applyUserId,jdbcType=INTEGER},
</if>
<if test="applyUserName != null">
#{applyUserName,jdbcType=VARCHAR},
</if>
<if test="reportStartTime != null">
#{reportStartTime,jdbcType=TIMESTAMP},
</if>
<if test="reportEndTime != null">
#{reportEndTime,jdbcType=TIMESTAMP},
</if>
<if test="fileName != null">
#{fileName,jdbcType=VARCHAR},
</if>
<if test="dataContent != null">
#{dataContent,jdbcType=VARCHAR},
</if>
<if test="dataUrl != null">
#{dataUrl,jdbcType=VARCHAR},
</if>
<if test="dataType != null">
#{dataType,jdbcType=INTEGER},
</if>
<if test="dataCount != null">
#{dataCount,jdbcType=INTEGER},
</if>
<if test="auditResult != null">
#{auditResult,jdbcType=INTEGER},
</if>
<if test="auditExpireTime != null">
#{auditExpireTime,jdbcType=TIMESTAMP},
</if>
<if test="downloadUrl != null">
#{downloadUrl,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="auditorId != null">
#{auditorId,jdbcType=INTEGER},
</if>
<if test="auditorName != null">
#{auditorName,jdbcType=VARCHAR},
</if>
<if test="auditorPhone != null">
#{auditorPhone,jdbcType=VARCHAR},
</if>
<if test="auditReason != null">
#{auditReason,jdbcType=VARCHAR},
</if>
<if test="projectCode != null">
#{projectCode,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabDownloadReport">
update tab_download_report
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="reportId != null">
report_id = #{reportId,jdbcType=VARCHAR},
</if>
<if test="applyUserId != null">
apply_user_id = #{applyUserId,jdbcType=INTEGER},
</if>
<if test="applyUserName != null">
apply_user_name = #{applyUserName,jdbcType=VARCHAR},
</if>
<if test="reportStartTime != null">
report_start_time = #{reportStartTime,jdbcType=TIMESTAMP},
</if>
<if test="reportEndTime != null">
report_end_time = #{reportEndTime,jdbcType=TIMESTAMP},
</if>
<if test="fileName != null">
file_name = #{fileName,jdbcType=VARCHAR},
</if>
<if test="dataContent != null">
data_content = #{dataContent,jdbcType=VARCHAR},
</if>
<if test="dataUrl != null">
data_url = #{dataUrl,jdbcType=VARCHAR},
</if>
<if test="dataType != null">
data_type = #{dataType,jdbcType=INTEGER},
</if>
<if test="dataCount != null">
data_count = #{dataCount,jdbcType=INTEGER},
</if>
<if test="auditResult != null">
audit_result = #{auditResult,jdbcType=INTEGER},
</if>
<if test="auditExpireTime != null">
audit_expire_time = #{auditExpireTime,jdbcType=TIMESTAMP},
</if>
<if test="downloadUrl != null">
download_url = #{downloadUrl,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="auditorId != null">
auditor_id = #{auditorId,jdbcType=INTEGER},
</if>
<if test="auditorName != null">
auditor_name = #{auditorName,jdbcType=VARCHAR},
</if>
<if test="auditorPhone != null">
auditor_phone = #{auditorPhone,jdbcType=VARCHAR},
</if>
<if test="auditReason != null">
audit_reason = #{auditReason,jdbcType=VARCHAR},
</if>
<if test="projectCode != null">
project_code = #{projectCode,jdbcType=VARCHAR},
</if>
</set>
where download_report_id = #{downloadReportId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabDownloadReport">
update tab_download_report
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
report_id = #{reportId,jdbcType=VARCHAR},
apply_user_id = #{applyUserId,jdbcType=INTEGER},
apply_user_name = #{applyUserName,jdbcType=VARCHAR},
report_start_time = #{reportStartTime,jdbcType=TIMESTAMP},
report_end_time = #{reportEndTime,jdbcType=TIMESTAMP},
file_name = #{fileName,jdbcType=VARCHAR},
data_content = #{dataContent,jdbcType=VARCHAR},
data_url = #{dataUrl,jdbcType=VARCHAR},
data_type = #{dataType,jdbcType=INTEGER},
data_count = #{dataCount,jdbcType=INTEGER},
audit_result = #{auditResult,jdbcType=INTEGER},
audit_expire_time = #{auditExpireTime,jdbcType=TIMESTAMP},
download_url = #{downloadUrl,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
auditor_id = #{auditorId,jdbcType=INTEGER},
auditor_name = #{auditorName,jdbcType=VARCHAR},
auditor_phone = #{auditorPhone,jdbcType=VARCHAR},
audit_reason = #{auditReason,jdbcType=VARCHAR},
project_code = #{projectCode,jdbcType=VARCHAR}
where download_report_id = #{downloadReportId,jdbcType=INTEGER}
</update>
<select id="getBySelective" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_download_report
where status = 1
<if test="reportId != null ">
and report_id = #{reportId}
</if>
limit 1
</select>
<select id="listDownloadReport" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_download_report
where status = 1
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="startTime != null ">
and create_time &gt; #{startTime}
</if>
<if test="endTime != null ">
and create_time &lt; #{endTime}
</if>
<if test="dataType != null ">
and data_type = #{dataType}
</if>
<if test="auditResult != null ">
and audit_result = #{auditResult}
</if>
<if test="searchValue != null and searchValue != '' ">
and (data_content like concat('%', #{searchValue} ,'%') or file_name like concat('%', #{searchValue} ,'%') or apply_user_name like concat('%', #{searchValue} ,'%') )
</if>
<if test="auditExpireTime != null ">
and audit_expire_time &lt; #{auditExpireTime}
</if>
<if test="ltAuditExpireTime != null ">
and audit_expire_time &gt; #{ltAuditExpireTime}
</if>
<if test="hasDownloadUrl != null ">
<if test="hasDownloadUrl">
and download_url is not null
</if>
<if test="!hasDownloadUrl">
and download_url is null
</if>
</if>
<if test="projectCode != null and projectCode != '' ">
and project_code = #{projectCode}
</if>
<if test="projectCode == null or projectCode == '' ">
and project_code = 'gic'
</if>
order by create_time desc
</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.TabEnterpriseInitMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabEnterpriseInit">
<id column="enterprise_init_id" jdbcType="INTEGER" property="enterpriseInitId" />
<result column="config_name" jdbcType="VARCHAR" property="configName" />
<result column="config_url" jdbcType="VARCHAR" property="configUrl" />
<result column="parent_id" jdbcType="INTEGER" property="parentId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<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="config_code" jdbcType="VARCHAR" property="configCode" />
<result column="level" jdbcType="INTEGER" property="level" />
<result column="is_init_config" jdbcType="INTEGER" property="isInitConfig" />
</resultMap>
<sql id="Base_Column_List">
enterprise_init_id, config_name, config_url, parent_id, enterprise_id, sort, create_time,
update_time, config_code, level, is_init_config
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_enterprise_init
where enterprise_init_id = #{enterpriseInitId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_enterprise_init
where enterprise_init_id = #{enterpriseInitId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabEnterpriseInit">
insert into tab_enterprise_init (enterprise_init_id, config_name, config_url,
parent_id, enterprise_id, sort,
create_time, update_time, config_code,
level, is_init_config)
values (#{enterpriseInitId,jdbcType=INTEGER}, #{configName,jdbcType=VARCHAR}, #{configUrl,jdbcType=VARCHAR},
#{parentId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{configCode,jdbcType=VARCHAR},
#{level,jdbcType=INTEGER}, #{isInitConfig,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabEnterpriseInit">
insert into tab_enterprise_init
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseInitId != null">
enterprise_init_id,
</if>
<if test="configName != null">
config_name,
</if>
<if test="configUrl != null">
config_url,
</if>
<if test="parentId != null">
parent_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="sort != null">
sort,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="configCode != null">
config_code,
</if>
<if test="level != null">
level,
</if>
<if test="isInitConfig != null">
is_init_config,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseInitId != null">
#{enterpriseInitId,jdbcType=INTEGER},
</if>
<if test="configName != null">
#{configName,jdbcType=VARCHAR},
</if>
<if test="configUrl != null">
#{configUrl,jdbcType=VARCHAR},
</if>
<if test="parentId != null">
#{parentId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,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="configCode != null">
#{configCode,jdbcType=VARCHAR},
</if>
<if test="level != null">
#{level,jdbcType=INTEGER},
</if>
<if test="isInitConfig != null">
#{isInitConfig,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabEnterpriseInit">
update tab_enterprise_init
<set>
<if test="configName != null">
config_name = #{configName,jdbcType=VARCHAR},
</if>
<if test="configUrl != null">
config_url = #{configUrl,jdbcType=VARCHAR},
</if>
<if test="parentId != null">
parent_id = #{parentId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,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="configCode != null">
config_code = #{configCode,jdbcType=VARCHAR},
</if>
<if test="level != null">
level = #{level,jdbcType=INTEGER},
</if>
<if test="isInitConfig != null">
is_init_config = #{isInitConfig,jdbcType=INTEGER},
</if>
</set>
where enterprise_init_id = #{enterpriseInitId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabEnterpriseInit">
update tab_enterprise_init
set config_name = #{configName,jdbcType=VARCHAR},
config_url = #{configUrl,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
sort = #{sort,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
config_code = #{configCode,jdbcType=VARCHAR},
level = #{level,jdbcType=INTEGER},
is_init_config = #{isInitConfig,jdbcType=INTEGER}
where enterprise_init_id = #{enterpriseInitId,jdbcType=INTEGER}
</update>
<update id="updateByEnterpriseIdSelective" parameterType="com.gic.enterprise.entity.TabEnterpriseInit">
update tab_enterprise_init
<set>
<if test="configName != null">
config_name = #{configName,jdbcType=VARCHAR},
</if>
<if test="configUrl != null">
config_url = #{configUrl,jdbcType=VARCHAR},
</if>
<if test="parentId != null">
parent_id = #{parentId,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="level != null">
level = #{level,jdbcType=INTEGER},
</if>
<if test="isInitConfig != null">
is_init_config = #{isInitConfig,jdbcType=INTEGER},
</if>
</set>
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
<if test="configCode != null">
and config_code = #{configCode,jdbcType=VARCHAR}
</if>
</update>
<select id="getByCode" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
from tab_enterprise_init
where enterprise_id = #{enterpriseId}
and config_code = #{configCode,jdbcType=VARCHAR}
</select>
<select id="listByParentId" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
from tab_enterprise_init force index(order_by_index)
where enterprise_id = #{enterpriseId}
<if test="parentId != null and parentId != '' ">
and parent_id = #{parentId}
</if>
ORDER BY parent_id, sort, `level`
</select>
<insert id="initEnterpriseConfigInfo">
INSERT INTO tab_enterprise_init (
config_name,
config_url,
parent_id,
enterprise_id,
sort,
create_time,
update_time,
config_code,
LEVEL,
is_init_config
) SELECT
t2.config_name,
t2.config_url,
t2.parent_id,
#{enterpriseId},
t2.sort,
now(),
now(),
t2.config_code,
t2. LEVEL,
t2.is_init_config
FROM
tab_enterprise_init t2
WHERE
t2.enterprise_id = - 1
</insert>
<update id="updateParentIdBatch">
UPDATE tab_enterprise_init
SET parent_id = (
select c.enterprise_init_id from (
SELECT
b.enterprise_init_id
FROM
tab_enterprise_init b
WHERE
b.enterprise_id = #{enterpriseId}
AND b.config_code = #{parentConfigCode}
) c
)
WHERE
enterprise_id = #{enterpriseId}
AND config_code in
<foreach collection="configCodeList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</update>
<delete id="deleteByEnterpriseId" parameterType="java.lang.Integer">
delete from tab_enterprise_init
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</delete>
</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.TabEnterpriseLicenseMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabEnterpriseLicense">
<id column="enterprise_license_id" jdbcType="INTEGER" property="enterpriseLicenseId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="license_id" jdbcType="INTEGER" property="licenseId" />
<result column="lower_limit" jdbcType="INTEGER" property="lowerLimit" />
<result column="upper_limit" jdbcType="INTEGER" property="upperLimit" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="license_name" jdbcType="VARCHAR" property="licenseName" />
</resultMap>
<sql id="Base_Column_List">
enterprise_license_id, enterprise_id, license_id, lower_limit, upper_limit, create_time,
update_time, license_name
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_enterprise_license
where enterprise_license_id = #{enterpriseLicenseId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_enterprise_license
where enterprise_license_id = #{enterpriseLicenseId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabEnterpriseLicense">
insert into tab_enterprise_license (enterprise_license_id, enterprise_id,
license_id, lower_limit, upper_limit,
create_time, update_time, license_name
)
values (#{enterpriseLicenseId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
#{licenseId,jdbcType=INTEGER}, #{lowerLimit,jdbcType=INTEGER}, #{upperLimit,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{licenseName,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabEnterpriseLicense">
insert into tab_enterprise_license
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseLicenseId != null">
enterprise_license_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="licenseId != null">
license_id,
</if>
<if test="lowerLimit != null">
lower_limit,
</if>
<if test="upperLimit != null">
upper_limit,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="licenseName != null">
license_name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseLicenseId != null">
#{enterpriseLicenseId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="licenseId != null">
#{licenseId,jdbcType=INTEGER},
</if>
<if test="lowerLimit != null">
#{lowerLimit,jdbcType=INTEGER},
</if>
<if test="upperLimit != null">
#{upperLimit,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="licenseName != null">
#{licenseName,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabEnterpriseLicense">
update tab_enterprise_license
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="licenseId != null">
license_id = #{licenseId,jdbcType=INTEGER},
</if>
<if test="lowerLimit != null">
lower_limit = #{lowerLimit,jdbcType=INTEGER},
</if>
<if test="upperLimit != null">
upper_limit = #{upperLimit,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="licenseName != null">
license_name = #{licenseName,jdbcType=VARCHAR},
</if>
</set>
where enterprise_license_id = #{enterpriseLicenseId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabEnterpriseLicense">
update tab_enterprise_license
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
license_id = #{licenseId,jdbcType=INTEGER},
lower_limit = #{lowerLimit,jdbcType=INTEGER},
upper_limit = #{upperLimit,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
license_name = #{licenseName,jdbcType=VARCHAR}
where enterprise_license_id = #{enterpriseLicenseId,jdbcType=INTEGER}
</update>
<insert id="saveFetch" parameterType="java.util.List">
insert into tab_enterprise_license (enterprise_license_id, enterprise_id,
license_id, lower_limit, upper_limit,
create_time, update_time, license_name
)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.enterpriseLicenseId},
#{item.enterpriseId},
#{item.licenseId},
#{item.lowerLimit},
#{item.upperLimit},
#{item.createTime},
#{item.updateTime},
#{item.licenseName}
)
</foreach>
</insert>
<delete id="deleteByEnterpriseId">
delete from tab_enterprise_license
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</delete>
<select id="listByEnterpriseId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_enterprise_license
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</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.TabEnterpriseMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabEnterprise">
<id column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="enterprise_name" jdbcType="VARCHAR" property="enterpriseName" />
<result column="company_name" jdbcType="VARCHAR" property="companyName" />
<result column="logo" jdbcType="VARCHAR" property="logo" />
<result column="area_id" jdbcType="VARCHAR" property="areaId" />
<result column="address" jdbcType="VARCHAR" property="address" />
<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="is_init_complete" jdbcType="INTEGER" property="isInitComplete" />
<result column="audit_time" jdbcType="TIMESTAMP" property="auditTime" />
<result column="version_code" jdbcType="VARCHAR" property="versionCode" />
<result column="version_name" jdbcType="VARCHAR" property="versionName" />
<result column="service_status" jdbcType="INTEGER" property="serviceStatus" />
<result column="creator_id" jdbcType="INTEGER" property="creatorId" />
</resultMap>
<sql id="Base_Column_List">
enterprise_id, enterprise_name, company_name, logo, area_id, address, status, create_time,
update_time, is_init_complete, audit_time, version_code, version_name, service_status, creator_id
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_enterprise
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_enterprise
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabEnterprise">
insert into tab_enterprise (enterprise_id, enterprise_name, company_name,
logo, area_id, address,
status, create_time, update_time,
is_init_complete, audit_time, version_code, version_name, service_status, creator_id)
values (#{enterpriseId,jdbcType=INTEGER}, #{enterpriseName,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR},
#{logo,jdbcType=VARCHAR}, #{areaId,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{isInitComplete,jdbcType=INTEGER}, #{auditTime,jdbcType=TIMESTAMP}, #{versionCode,jdbcType=VARCHAR},
#{versionName,jdbcType=VARCHAR}, #{serviceStatus,jdbcType=INTEGER}, #{creatorId,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabEnterprise" useGeneratedKeys="true" keyProperty="enterpriseId">
insert into tab_enterprise
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="enterpriseName != null">
enterprise_name,
</if>
<if test="companyName != null">
company_name,
</if>
<if test="logo != null">
logo,
</if>
<if test="areaId != null">
area_id,
</if>
<if test="address != null">
address,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="isInitComplete != null">
is_init_complete,
</if>
<if test="auditTime != null">
audit_time,
</if>
<if test="versionCode != null">
version_code,
</if>
<if test="versionName != null">
version_name,
</if>
<if test="serviceStatus != null">
service_status,
</if>
<if test="creatorId != null">
creator_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="enterpriseName != null">
#{enterpriseName,jdbcType=VARCHAR},
</if>
<if test="companyName != null">
#{companyName,jdbcType=VARCHAR},
</if>
<if test="logo != null">
#{logo,jdbcType=VARCHAR},
</if>
<if test="areaId != null">
#{areaId,jdbcType=VARCHAR},
</if>
<if test="address != null">
#{address,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="isInitComplete != null">
#{isInitComplete,jdbcType=INTEGER},
</if>
<if test="auditTime != null">
#{auditTime,jdbcType=TIMESTAMP},
</if>
<if test="versionCode != null">
#{versionCode,jdbcType=VARCHAR},
</if>
<if test="versionName != null">
#{versionName,jdbcType=VARCHAR},
</if>
<if test="serviceStatus != null">
#{serviceStatus,jdbcType=INTEGER},
</if>
<if test="creatorId != null">
#{creatorId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabEnterprise">
update tab_enterprise
<set>
<if test="enterpriseName != null">
enterprise_name = #{enterpriseName,jdbcType=VARCHAR},
</if>
<if test="companyName != null">
company_name = #{companyName,jdbcType=VARCHAR},
</if>
<if test="logo != null">
logo = #{logo,jdbcType=VARCHAR},
</if>
<if test="areaId != null">
area_id = #{areaId,jdbcType=VARCHAR},
</if>
<if test="address != null">
address = #{address,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="isInitComplete != null">
is_init_complete = #{isInitComplete,jdbcType=INTEGER},
</if>
<if test="auditTime != null">
audit_time = #{auditTime,jdbcType=TIMESTAMP},
</if>
<if test="versionCode != null">
version_code = #{versionCode,jdbcType=VARCHAR},
</if>
<if test="versionName != null">
version_name = #{versionName,jdbcType=VARCHAR},
</if>
<if test="serviceStatus != null">
service_status = #{serviceStatus,jdbcType=INTEGER},
</if>
<if test="creatorId != null">
creator_id = #{creatorId,jdbcType=INTEGER},
</if>
</set>
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabEnterprise">
update tab_enterprise
set enterprise_name = #{enterpriseName,jdbcType=VARCHAR},
company_name = #{companyName,jdbcType=VARCHAR},
logo = #{logo,jdbcType=VARCHAR},
area_id = #{areaId,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_init_complete = #{isInitComplete,jdbcType=INTEGER},
audit_time = #{auditTime,jdbcType=TIMESTAMP},
version_code = #{versionCode,jdbcType=VARCHAR},
version_name = #{versionName,jdbcType=VARCHAR},
service_status = #{serviceStatus,jdbcType=INTEGER},
creator_id = #{creatorId,jdbcType=INTEGER}
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</update>
<select id="countByEnterpriseName" resultType="int">
select count(1) from tab_enterprise
where status <![CDATA[ <> ]]> 0
and enterprise_name = #{enterpriseName}
<if test="enterpriseId != null">
and enterprise_id <![CDATA[ <> ]]> #{enterpriseId}
</if>
</select>
<select id="countByCompanyName" resultType="int">
select count(1) from tab_enterprise
where status <![CDATA[ <> ]]> 0
and company_name = #{companyName}
<if test="enterpriseId != null">
and enterprise_id <![CDATA[ <> ]]> #{enterpriseId}
</if>
</select>
<select id="listEnterpriseId" resultType="com.gic.enterprise.dto.EnterpriseListDTO">
SELECT
a.enterprise_id enterpriseId,
a.enterprise_name enterpriseName,
a.logo logo,
a.company_name companyName,
a.create_time createTime,
a.is_init_complete isInitComplete,
GROUP_CONCAT(b.upper_limit separator '-') licenseUpperLimitStr,
a.version_code versionCode,
a.version_name versionName,
a.audit_time expirationTime,
a.`service_status` serviceStatus,
if(a.audit_time is not null, DATEDIFF(a.audit_time, now()), 0) aboutToExpireDay
FROM
tab_enterprise a
LEFT JOIN tab_enterprise_license b ON a.enterprise_id = b.enterprise_id
where status = 1
<if test="search != null and search != '' ">
and ( a.enterprise_name like concat('%', #{search}, '%') or a.company_name like concat('%', #{search}, '%') )
</if>
<if test="serviceVersion != null">
and a.version_code = #{serviceVersion}
</if>
<if test="serviceStatus != null">
<if test="serviceStatus == 1 ">
and DATEDIFF(a.audit_time, now()) <![CDATA[ > ]]> 90
</if>
<if test="serviceStatus == 4 ">
and DATEDIFF(a.audit_time, now()) <![CDATA[ <= ]]> 90
and DATEDIFF(a.audit_time, now()) <![CDATA[ >= ]]> 0
</if>
<if test="serviceStatus == 3 ">
and DATEDIFF(a.audit_time, now()) <![CDATA[ < ]]> 0
</if>
<if test="serviceStatus != 4 and serviceStatus != 3 and serviceStatus != 1">
and a.service_status = #{serviceStatus}
</if>
</if>
GROUP BY a.enterprise_id
<if test="orderBy != null and orderBy != '' ">
${orderBy}
</if>
<if test="orderBy == null or orderBy == '' ">
order by a.create_time desc
</if>
</select>
<select id="listEnterpriseIdOfNew" resultType="com.gic.enterprise.dto.EnterpriseListDTO" parameterType="com.gic.enterprise.qo.EnterpriseQO">
SELECT
a.enterprise_id enterpriseId,
a.enterprise_name enterpriseName,
a.logo logo,
a.company_name companyName,
a.create_time createTime,
a.is_init_complete isInitComplete,
GROUP_CONCAT(b.upper_limit ORDER BY b.enterprise_license_id separator '-') licenseUpperLimitStr,
a.version_code versionCode,
a.version_name versionName,
a.audit_time expirationTime,
a.`service_status` serviceStatus,
if(a.audit_time is not null, DATEDIFF(a.audit_time, now()), 0) aboutToExpireDay
FROM
tab_enterprise a
LEFT JOIN tab_enterprise_license b ON a.enterprise_id = b.enterprise_id
where status = 1
<if test="search != null and search != '' ">
and ( a.enterprise_name like concat('%', #{search}, '%') or a.company_name like concat('%', #{search}, '%') )
</if>
<if test="serviceVersion != null">
and a.version_code = #{serviceVersion}
</if>
<if test="serviceStatus != null">
<if test="serviceStatus == 1 ">
and DATEDIFF(a.audit_time, now()) <![CDATA[ > ]]> 90
</if>
<if test="serviceStatus == 4 ">
and DATEDIFF(a.audit_time, now()) <![CDATA[ <= ]]> 90
and DATEDIFF(a.audit_time, now()) <![CDATA[ >= ]]> 0
</if>
<if test="serviceStatus == 3 ">
and DATEDIFF(a.audit_time, now()) <![CDATA[ < ]]> 0
</if>
<if test="serviceStatus != 4 and serviceStatus != 3 and serviceStatus != 1">
and a.service_status = #{serviceStatus}
</if>
</if>
<if test="listAll == null or listAll != 1 ">
<if test="enterpriseIdList != null and enterpriseIdList.size() &gt; 0">
and a.enterprise_id in
<foreach close=")" collection="enterpriseIdList" index="index" item="enterpriseId" open="(" separator=",">
#{enterpriseId}
</foreach>
</if>
or a.creator_id = #{creatorId}
</if>
GROUP BY a.enterprise_id
<if test="orderBy != null and orderBy != '' ">
${orderBy}
</if>
<if test="orderBy == null or orderBy == '' ">
order by a.create_time desc
</if>
</select>
<select id="listEnterpriseByName" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_enterprise
where status = 1
<if test="search != null and search != '' ">
and ( enterprise_name like concat('%', #{search}, '%') or company_name like concat('%', #{search}, '%') )
</if>
</select>
<select id="listEnterprise" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_enterprise
where status = 1
</select>
<select id="listEnterpriseByIds" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_enterprise
where status = 1
<if test="enterpriseIdList != null and enterpriseIdList.size() &gt; 0">
and enterprise_id in
<foreach close=")" collection="enterpriseIdList" index="index" item="enterpriseId" open="(" separator=",">
#{enterpriseId}
</foreach>
</if>
</select>
<select id="getEnterpriseByName" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_enterprise
where enterprise_name = #{enterpriseName} 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.TabEnterpriseResourceRelMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabEnterpriseResourceRel">
<id column="enterprise_resource_id" jdbcType="INTEGER" property="enterpriseResourceId" />
<result column="resource_code" jdbcType="VARCHAR" property="resourceCode" />
<result column="resource_name" jdbcType="VARCHAR" property="resourceName" />
<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="resource_switch" jdbcType="INTEGER" property="resourceSwitch" />
</resultMap>
<sql id="Base_Column_List">
enterprise_resource_id, resource_code, resource_name, enterprise_id, status, create_time,
update_time, resource_switch
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_enterprise_resource_rel
where enterprise_resource_id = #{enterpriseResourceId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_enterprise_resource_rel
where enterprise_resource_id = #{enterpriseResourceId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabEnterpriseResourceRel">
insert into tab_enterprise_resource_rel (enterprise_resource_id, resource_code,
resource_name, enterprise_id, status,
create_time, update_time, resource_switch
)
values (#{enterpriseResourceId,jdbcType=INTEGER}, #{resourceCode,jdbcType=VARCHAR},
#{resourceName,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{resourceSwitch,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabEnterpriseResourceRel">
insert into tab_enterprise_resource_rel
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseResourceId != null">
enterprise_resource_id,
</if>
<if test="resourceCode != null">
resource_code,
</if>
<if test="resourceName != null">
resource_name,
</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="resourceSwitch != null">
resource_switch,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseResourceId != null">
#{enterpriseResourceId,jdbcType=INTEGER},
</if>
<if test="resourceCode != null">
#{resourceCode,jdbcType=VARCHAR},
</if>
<if test="resourceName != null">
#{resourceName,jdbcType=VARCHAR},
</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="resourceSwitch != null">
#{resourceSwitch,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabEnterpriseResourceRel">
update tab_enterprise_resource_rel
<set>
<if test="resourceCode != null">
resource_code = #{resourceCode,jdbcType=VARCHAR},
</if>
<if test="resourceName != null">
resource_name = #{resourceName,jdbcType=VARCHAR},
</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>
<if test="resourceSwitch != null">
resource_switch = #{resourceSwitch,jdbcType=INTEGER},
</if>
</set>
where enterprise_resource_id = #{enterpriseResourceId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabEnterpriseResourceRel">
update tab_enterprise_resource_rel
set resource_code = #{resourceCode,jdbcType=VARCHAR},
resource_name = #{resourceName,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
resource_switch = #{resourceSwitch,jdbcType=INTEGER}
where enterprise_resource_id = #{enterpriseResourceId,jdbcType=INTEGER}
</update>
<update id="deleteResource">
update tab_enterprise_resource_rel set status = 0
where status = 1
and enterprise_id = #{enterpriseId}
and resource_code = #{resourceCode}
</update>
<select id="getByEnterpriseId" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_enterprise_resource_rel
where status = 1
and enterprise_id = #{enterpriseId}
</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.TabEnterpriseWhiteListMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabEnterpriseWhiteList">
<id column="white_list_id" jdbcType="INTEGER" property="whiteListId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="enterprise_name" jdbcType="VARCHAR" property="enterpriseName" />
<result column="company_name" jdbcType="VARCHAR" property="companyName" />
<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">
white_list_id, enterprise_id, enterprise_name, company_name, status, create_time,
update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_enterprise_white_list
where white_list_id = #{whiteListId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_enterprise_white_list
where white_list_id = #{whiteListId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabEnterpriseWhiteList">
insert into tab_enterprise_white_list (white_list_id, enterprise_id, enterprise_name,
company_name, status, create_time,
update_time)
values (#{whiteListId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{enterpriseName,jdbcType=VARCHAR},
#{companyName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabEnterpriseWhiteList">
insert into tab_enterprise_white_list
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="whiteListId != null">
white_list_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="enterpriseName != null">
enterprise_name,
</if>
<if test="companyName != null">
company_name,
</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="whiteListId != null">
#{whiteListId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="enterpriseName != null">
#{enterpriseName,jdbcType=VARCHAR},
</if>
<if test="companyName != null">
#{companyName,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.TabEnterpriseWhiteList">
update tab_enterprise_white_list
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="enterpriseName != null">
enterprise_name = #{enterpriseName,jdbcType=VARCHAR},
</if>
<if test="companyName != null">
company_name = #{companyName,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 white_list_id = #{whiteListId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabEnterpriseWhiteList">
update tab_enterprise_white_list
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
enterprise_name = #{enterpriseName,jdbcType=VARCHAR},
company_name = #{companyName,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where white_list_id = #{whiteListId,jdbcType=INTEGER}
</update>
<select id="getEnterpriseWhiteList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
from tab_enterprise_white_list
where enterprise_id = #{enterpriseId}
and status = 1
</select>
<select id="listEnterpriseWhiteList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
from tab_enterprise_white_list
where status = 1
<if test="search != null and search != ''">
and (enterprise_name like concat('%', #{search}, '%') or company_name like concat('%', #{search}, '%'))
</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.TabGuideTypeMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabGuideType">
<id column="guide_type_id" jdbcType="INTEGER" property="guideTypeId" />
<result column="guide_type" jdbcType="INTEGER" property="guideType" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="path" jdbcType="VARCHAR" property="path" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
guide_type_id, guide_type, name, path, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_guide_type
where guide_type_id = #{guideTypeId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_guide_type
where guide_type_id = #{guideTypeId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabGuideType">
insert into tab_guide_type (guide_type_id, guide_type, name,
path, create_time, update_time
)
values (#{guideTypeId,jdbcType=INTEGER}, #{guideType,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
#{path,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabGuideType">
insert into tab_guide_type
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="guideTypeId != null">
guide_type_id,
</if>
<if test="guideType != null">
guide_type,
</if>
<if test="name != null">
name,
</if>
<if test="path != null">
path,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="guideTypeId != null">
#{guideTypeId,jdbcType=INTEGER},
</if>
<if test="guideType != null">
#{guideType,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="path != null">
#{path,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.TabGuideType">
update tab_guide_type
<set>
<if test="guideType != null">
guide_type = #{guideType,jdbcType=INTEGER},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="path != null">
path = #{path,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 guide_type_id = #{guideTypeId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabGuideType">
update tab_guide_type
set guide_type = #{guideType,jdbcType=INTEGER},
name = #{name,jdbcType=VARCHAR},
path = #{path,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where guide_type_id = #{guideTypeId,jdbcType=INTEGER}
</update>
<select id="listGuideType" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_guide_type
</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.TabHelpCenterMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabHelpCenter">
<id column="help_id" jdbcType="INTEGER" property="helpId" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="help_url" jdbcType="VARCHAR" property="helpUrl" />
<result column="mode" jdbcType="INTEGER" property="mode" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_show" jdbcType="INTEGER" property="isShow" />
<result column="status" jdbcType="INTEGER" property="status" />
</resultMap>
<sql id="Base_Column_List">
help_id, title, help_url, mode, create_time, update_time, is_show, status
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_help_center
where help_id = #{helpId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_help_center
where help_id = #{helpId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabHelpCenter">
insert into tab_help_center (help_id, title, help_url,
mode, create_time, update_time,
is_show, status)
values (#{helpId,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{helpUrl,jdbcType=VARCHAR},
#{mode,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{isShow,jdbcType=INTEGER}, #{status,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabHelpCenter">
insert into tab_help_center
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="helpId != null">
help_id,
</if>
<if test="title != null">
title,
</if>
<if test="helpUrl != null">
help_url,
</if>
<if test="mode != null">
mode,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="isShow != null">
is_show,
</if>
<if test="status != null">
status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="helpId != null">
#{helpId,jdbcType=INTEGER},
</if>
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="helpUrl != null">
#{helpUrl,jdbcType=VARCHAR},
</if>
<if test="mode != null">
#{mode,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="isShow != null">
#{isShow,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabHelpCenter">
update tab_help_center
<set>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="helpUrl != null">
help_url = #{helpUrl,jdbcType=VARCHAR},
</if>
<if test="mode != null">
mode = #{mode,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="isShow != null">
is_show = #{isShow,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
</set>
where help_id = #{helpId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabHelpCenter">
update tab_help_center
set title = #{title,jdbcType=VARCHAR},
help_url = #{helpUrl,jdbcType=VARCHAR},
mode = #{mode,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_show = #{isShow,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER}
where help_id = #{helpId,jdbcType=INTEGER}
</update>
<select id="pageHelpCenter" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_help_center
where status=1
<if test="search != null and search != ''">
and title like concat('%', #{search}, '%')
</if>
<if test="mode != null">
and mode = #{mode}
</if>
<if test="isShow != null">
and is_show = #{isShow}
</if>
</select>
<select id="list" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_help_center
where status=1
and is_show = 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.TabIndexModuleEnterpriseMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabIndexModuleEnterprise">
<id column="index_module_enterprise_id" jdbcType="INTEGER" property="indexModuleEnterpriseId" />
<result column="index_module_id" jdbcType="INTEGER" property="indexModuleId" />
<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">
index_module_enterprise_id, index_module_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_index_module_enterprise
where index_module_enterprise_id = #{indexModuleEnterpriseId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_index_module_enterprise
where index_module_enterprise_id = #{indexModuleEnterpriseId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabIndexModuleEnterprise">
insert into tab_index_module_enterprise (index_module_enterprise_id, index_module_id,
enterprise_id, status, create_time,
update_time)
values (#{indexModuleEnterpriseId,jdbcType=INTEGER}, #{indexModuleId,jdbcType=INTEGER},
#{enterpriseId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabIndexModuleEnterprise">
insert into tab_index_module_enterprise
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="indexModuleEnterpriseId != null">
index_module_enterprise_id,
</if>
<if test="indexModuleId != null">
index_module_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="indexModuleEnterpriseId != null">
#{indexModuleEnterpriseId,jdbcType=INTEGER},
</if>
<if test="indexModuleId != null">
#{indexModuleId,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.TabIndexModuleEnterprise">
update tab_index_module_enterprise
<set>
<if test="indexModuleId != null">
index_module_id = #{indexModuleId,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 index_module_enterprise_id = #{indexModuleEnterpriseId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabIndexModuleEnterprise">
update tab_index_module_enterprise
set index_module_id = #{indexModuleId,jdbcType=INTEGER},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where index_module_enterprise_id = #{indexModuleEnterpriseId,jdbcType=INTEGER}
</update>
<update id="delByIndexModuleId">
update tab_index_module_enterprise
set status = 0
where index_module_id = #{indexModuleId,jdbcType=INTEGER}
</update>
<insert id="insertSelectiveByNotExist">
INSERT INTO tab_index_module_enterprise (
index_module_id,
enterprise_id,
status,
create_time
) SELECT
#{indexModuleId},
#{enterpriseId},
#{status},
#{createTime}
FROM
DUAL
WHERE
NOT EXISTS (
SELECT
1
FROM
tab_index_module_enterprise tb
WHERE
tb.index_module_id = #{indexModuleId}
AND tb.enterprise_id = #{enterpriseId}
)
</insert>
<update id="updateStatusByEnterpriseId">
update tab_index_module_enterprise
set status = 1
<where>
<if test="indexModuleId != null ">
and index_module_id = #{indexModuleId}
</if>
<if test="null != ids and ids.size > 0">
and enterprise_id in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</update>
<select id="listIndexModuleEnterprise" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_index_module_enterprise
where status = 1
<if test="indexModuleId != null ">
and index_module_id = #{indexModuleId}
</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.TabIndexModuleMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabIndexModule">
<id column="index_module_id" jdbcType="INTEGER" property="indexModuleId" />
<result column="index_module_name" jdbcType="VARCHAR" property="indexModuleName" />
<result column="index_module_code" jdbcType="VARCHAR" property="indexModuleCode" />
<result column="module_type" jdbcType="INTEGER" property="moduleType" />
<result column="module_template_code" jdbcType="VARCHAR" property="moduleTemplateCode" />
<result column="is_use" jdbcType="INTEGER" property="isUse" />
<result column="create_user_login_name" jdbcType="VARCHAR" property="createUserLoginName" />
<result column="object_type" jdbcType="INTEGER" property="objectType" />
<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="sort" jdbcType="DOUBLE" property="sort" />
</resultMap>
<sql id="Base_Column_List">
index_module_id, index_module_name, index_module_code, module_type, module_template_code,
is_use, create_user_login_name, object_type, status, create_time, update_time, sort
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_index_module
where index_module_id = #{indexModuleId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_index_module
where index_module_id = #{indexModuleId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabIndexModule">
insert into tab_index_module (index_module_id, index_module_name, index_module_code,
module_type, module_template_code, is_use,
create_user_login_name, object_type, status,
create_time, update_time, sort
)
values (#{indexModuleId,jdbcType=INTEGER}, #{indexModuleName,jdbcType=VARCHAR}, #{indexModuleCode,jdbcType=VARCHAR},
#{moduleType,jdbcType=INTEGER}, #{moduleTemplateCode,jdbcType=VARCHAR}, #{isUse,jdbcType=INTEGER},
#{createUserLoginName,jdbcType=VARCHAR}, #{objectType,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{sort,jdbcType=DOUBLE}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabIndexModule">
<selectKey keyProperty="indexModuleId" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_index_module
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="indexModuleId != null">
index_module_id,
</if>
<if test="indexModuleName != null">
index_module_name,
</if>
<if test="indexModuleCode != null">
index_module_code,
</if>
<if test="moduleType != null">
module_type,
</if>
<if test="moduleTemplateCode != null">
module_template_code,
</if>
<if test="isUse != null">
is_use,
</if>
<if test="createUserLoginName != null">
create_user_login_name,
</if>
<if test="objectType != null">
object_type,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="sort != null">
sort,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="indexModuleId != null">
#{indexModuleId,jdbcType=INTEGER},
</if>
<if test="indexModuleName != null">
#{indexModuleName,jdbcType=VARCHAR},
</if>
<if test="indexModuleCode != null">
#{indexModuleCode,jdbcType=VARCHAR},
</if>
<if test="moduleType != null">
#{moduleType,jdbcType=INTEGER},
</if>
<if test="moduleTemplateCode != null">
#{moduleTemplateCode,jdbcType=VARCHAR},
</if>
<if test="isUse != null">
#{isUse,jdbcType=INTEGER},
</if>
<if test="createUserLoginName != null">
#{createUserLoginName,jdbcType=VARCHAR},
</if>
<if test="objectType != null">
#{objectType,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="sort != null">
#{sort,jdbcType=DOUBLE},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabIndexModule">
update tab_index_module
<set>
<if test="indexModuleName != null">
index_module_name = #{indexModuleName,jdbcType=VARCHAR},
</if>
<if test="indexModuleCode != null">
index_module_code = #{indexModuleCode,jdbcType=VARCHAR},
</if>
<if test="moduleType != null">
module_type = #{moduleType,jdbcType=INTEGER},
</if>
<if test="moduleTemplateCode != null">
module_template_code = #{moduleTemplateCode,jdbcType=VARCHAR},
</if>
<if test="isUse != null">
is_use = #{isUse,jdbcType=INTEGER},
</if>
<if test="createUserLoginName != null">
create_user_login_name = #{createUserLoginName,jdbcType=VARCHAR},
</if>
<if test="objectType != null">
object_type = #{objectType,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="sort != null">
sort = #{sort,jdbcType=DOUBLE},
</if>
</set>
where index_module_id = #{indexModuleId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabIndexModule">
update tab_index_module
set index_module_name = #{indexModuleName,jdbcType=VARCHAR},
index_module_code = #{indexModuleCode,jdbcType=VARCHAR},
module_type = #{moduleType,jdbcType=INTEGER},
module_template_code = #{moduleTemplateCode,jdbcType=VARCHAR},
is_use = #{isUse,jdbcType=INTEGER},
create_user_login_name = #{createUserLoginName,jdbcType=VARCHAR},
object_type = #{objectType,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
sort = #{sort,jdbcType=DOUBLE}
where index_module_id = #{indexModuleId,jdbcType=INTEGER}
</update>
<select id="getBySelective" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_index_module
where status = 1
<if test="indexModuleName != null ">
and index_module_name = #{indexModuleName}
</if>
<if test="indexModuleCode != null ">
and index_module_code = #{indexModuleCode}
</if>
</select>
<select id="getMinSort" resultType="double">
select
min(sort)
from tab_index_module
where status = 1
</select>
<select id="getMaxSort" resultType="double">
select
max(sort)
from tab_index_module
where status = 1
</select>
<select id="listIndexModule" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_index_module
where status = 1
order by sort
</select>
<select id="listTwoElementExceptId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_index_module
where status = 1
and index_module_id &lt;&gt; #{indexModuleId}
order by sort
limit #{start}, #{size}
</select>
<select id="listIndexModuleEnterprise" resultMap="BaseResultMap">
select
t1.index_module_id, t1.index_module_name, t1.index_module_code, t1.module_type, t1.module_template_code,
t1.is_use, t1.object_type, t1.status, t1.create_time, t1.update_time, t1.sort
from tab_index_module t1, tab_index_module_enterprise t2
where t1.index_module_id = t2.index_module_id
and t1.status = 1
and t2.status = 1
and t1.is_use = 1
and (
t1.object_type = 1 or ( t1.object_type = 2 and t2.enterprise_id = #{enterpriseId} )
)
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.TabLinkMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabLink">
<id column="link_id" jdbcType="INTEGER" property="linkId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="parent_id" jdbcType="INTEGER" property="parentId" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="object_type" jdbcType="INTEGER" property="objectType" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="h5_content" jdbcType="VARCHAR" property="h5Content" />
<result column="applet_content" jdbcType="VARCHAR" property="appletContent" />
<result column="conditions" jdbcType="INTEGER" property="conditions" />
<result column="is_custom" jdbcType="INTEGER" property="isCustom" />
<result column="enterprise_type" jdbcType="INTEGER" property="enterpriseType" />
</resultMap>
<sql id="Base_Column_List">
link_id, create_time, update_time, parent_id, status, type, object_type, name, h5_content,
applet_content, conditions, is_custom, enterprise_type
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_link
where link_id = #{linkId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_link
where link_id = #{linkId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabLink">
insert into tab_link (link_id, create_time, update_time,
parent_id, status, type,
object_type, name, h5_content,
applet_content, conditions, is_custom,
enterprise_type)
values (#{linkId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{parentId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{type,jdbcType=INTEGER},
#{objectType,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{h5Content,jdbcType=VARCHAR},
#{appletContent,jdbcType=VARCHAR}, #{conditions,jdbcType=INTEGER}, #{isCustom,jdbcType=INTEGER},
#{enterpriseType,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabLink">
insert into tab_link
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="linkId != null">
link_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="parentId != null">
parent_id,
</if>
<if test="status != null">
status,
</if>
<if test="type != null">
type,
</if>
<if test="objectType != null">
object_type,
</if>
<if test="name != null">
name,
</if>
<if test="h5Content != null">
h5_content,
</if>
<if test="appletContent != null">
applet_content,
</if>
<if test="conditions != null">
conditions,
</if>
<if test="isCustom != null">
is_custom,
</if>
<if test="enterpriseType != null">
enterprise_type,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="linkId != null">
#{linkId,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="parentId != null">
#{parentId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="objectType != null">
#{objectType,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="h5Content != null">
#{h5Content,jdbcType=VARCHAR},
</if>
<if test="appletContent != null">
#{appletContent,jdbcType=VARCHAR},
</if>
<if test="conditions != null">
#{conditions,jdbcType=INTEGER},
</if>
<if test="isCustom != null">
#{isCustom,jdbcType=INTEGER},
</if>
<if test="enterpriseType != null">
#{enterpriseType,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabLink">
update tab_link
<set>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="parentId != null">
parent_id = #{parentId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="objectType != null">
object_type = #{objectType,jdbcType=INTEGER},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="h5Content != null">
h5_content = #{h5Content,jdbcType=VARCHAR},
</if>
<if test="appletContent != null">
applet_content = #{appletContent,jdbcType=VARCHAR},
</if>
<if test="conditions != null">
conditions = #{conditions,jdbcType=INTEGER},
</if>
<if test="isCustom != null">
is_custom = #{isCustom,jdbcType=INTEGER},
</if>
<if test="enterpriseType != null">
enterprise_type = #{enterpriseType,jdbcType=INTEGER},
</if>
</set>
where link_id = #{linkId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabLink">
update tab_link
set create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
parent_id = #{parentId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
type = #{type,jdbcType=INTEGER},
object_type = #{objectType,jdbcType=INTEGER},
name = #{name,jdbcType=VARCHAR},
h5_content = #{h5Content,jdbcType=VARCHAR},
applet_content = #{appletContent,jdbcType=VARCHAR},
conditions = #{conditions,jdbcType=INTEGER},
is_custom = #{isCustom,jdbcType=INTEGER},
enterprise_type = #{enterpriseType,jdbcType=INTEGER}
where link_id = #{linkId,jdbcType=INTEGER}
</update>
<select id="getSelective" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_link
where status = 1
<if test="name != null ">
and name = #{name}
</if>
<if test="linkId != null ">
and link_id &lt;&gt; #{linkId}
</if>
limit 1
</select>
<select id="getLinkIdsByParentIds" resultType="int">
select
link_id
from tab_link
where status = 1
<if test="null != ids and ids.size &gt; 0">
and parent_id in
<foreach close=")" collection="ids" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
</select>
<select id="getLinkByParentIds" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_link
where status = 1
<if test="null != ids and ids.size &gt; 0">
and parent_id in
<foreach close=")" collection="ids" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
</select>
<update id="delLinkByIdList">
update tab_link set status = 0 where status = 1
and link_id in
<foreach close=")" collection="ids" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</update>
<select id="listLinkType" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_link
where status = 1
and parent_id = 0
</select>
<select id="listLinkMenu" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_link
where status = 1
and parent_id &lt;&gt; 0
-- and type = 0
<if test="search != null and search != '' ">
and name like concat('%', #{search}, '%')
</if>
<if test="parentId != null ">
and parent_id = #{parentId}
</if>
</select>
<select id="listByGic" resultMap="BaseResultMap">
select
t1.link_id, t1.create_time, t1.update_time, t1.parent_id, t1.status, t1.type, t1.object_type, t1.name, t1.h5_content,
t1.applet_content, t1.is_custom
from tab_link t1 left join tab_link_scene t2 on t1.link_id = t2.link_id
and t1.parent_id = #{parentId}
and (t1.enterprise_type = 1 or (t1.enterprise_type = 2 and t2.enterprise_id = #{enterpriseId} and t2.status = 1 ))
and t1.status = 1
</select>
<select id="treeByGic" resultMap="BaseResultMap">
select
t1.link_id, t1.create_time, t1.update_time, t1.parent_id, t1.status, t1.type, t1.object_type, t1.name, t1.h5_content,
t1.applet_content, t1.is_custom
from tab_link t1 left join (
select * from tab_link_scene where status = 1
) t2 on t1.link_id = t2.link_id
where (t1.enterprise_type = 1 or (t1.enterprise_type = 2 and t2.enterprise_id = #{enterpriseId} ))
and t1.status = 1
<if test="objectType != null ">
<if test="objectType == 1">
and h5_content is not null
and h5_content &lt;&gt; ''
</if>
<if test="objectType == 2">
and applet_content is not null
and applet_content &lt;&gt; ''
</if>
</if>
order by create_time
</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.TabLinkSceneMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabLinkScene">
<id column="link_scene_id" jdbcType="INTEGER" property="linkSceneId" />
<result column="link_id" jdbcType="INTEGER" property="linkId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<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">
link_scene_id, link_id, enterprise_id, create_time, update_time, status
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_link_scene
where link_scene_id = #{linkSceneId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_link_scene
where link_scene_id = #{linkSceneId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabLinkScene">
insert into tab_link_scene (link_scene_id, link_id, enterprise_id,
create_time, update_time, status
)
values (#{linkSceneId,jdbcType=INTEGER}, #{linkId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabLinkScene">
insert into tab_link_scene
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="linkSceneId != null">
link_scene_id,
</if>
<if test="linkId != null">
link_id,
</if>
<if test="enterpriseId != null">
enterprise_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="linkSceneId != null">
#{linkSceneId,jdbcType=INTEGER},
</if>
<if test="linkId != null">
#{linkId,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>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabLinkScene">
update tab_link_scene
<set>
<if test="linkId != null">
link_id = #{linkId,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>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
</set>
where link_scene_id = #{linkSceneId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabLinkScene">
update tab_link_scene
set link_id = #{linkId,jdbcType=INTEGER},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER}
where link_scene_id = #{linkSceneId,jdbcType=INTEGER}
</update>
<select id="listByLinkId" resultType="int">
select
enterprise_id
from tab_link_scene
where status = 1
and link_id = #{linkId}
</select>
<update id="delByLinkEnterprise">
update tab_link_scene set status = 0 where status = 1 and link_id = #{linkId}
</update>
<insert id="insertSelectiveByNotExist">
INSERT INTO tab_link_scene (
link_id,
enterprise_id,
create_time,
status
) SELECT
#{linkId},
#{enterpriseId},
#{createTime},
#{status}
FROM
DUAL
WHERE
NOT EXISTS (
SELECT
1
FROM
tab_link_scene tb
WHERE
tb.link_id = #{linkId}
and tb.enterprise_id = #{enterpriseId}
)
</insert>
<update id="updateStatusByEnterpriseId">
update tab_link_scene set status = 1 where link_id = #{linkId}
and enterprise_id in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</update>
<update id="delByLinkIdList">
update tab_link_scene set status = 0 where status = 1 and
link_id in
<foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</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.TabPlatformBrandMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabPlatformBrand">
<id column="platform_brand_id" jdbcType="INTEGER" property="platformBrandId" />
<result column="platform_brand_category_code" jdbcType="VARCHAR" property="platformBrandCategoryCode" />
<result column="platform_brand_category_name" jdbcType="VARCHAR" property="platformBrandCategoryName" />
<result column="platform_brand_name" jdbcType="VARCHAR" property="platformBrandName" />
<result column="create_type" jdbcType="INTEGER" property="createType" />
<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">
platform_brand_id, platform_brand_category_code, platform_brand_category_name, platform_brand_name,
create_type, create_time, update_time, status
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_platform_brand
where platform_brand_id = #{platformBrandId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_platform_brand
where platform_brand_id = #{platformBrandId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabPlatformBrand">
insert into tab_platform_brand (platform_brand_id, platform_brand_category_code,
platform_brand_category_name, platform_brand_name,
create_type, create_time, update_time,
status)
values (#{platformBrandId,jdbcType=INTEGER}, #{platformBrandCategoryCode,jdbcType=VARCHAR},
#{platformBrandCategoryName,jdbcType=VARCHAR}, #{platformBrandName,jdbcType=VARCHAR},
#{createType,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{status,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabPlatformBrand">
<selectKey keyProperty="platformBrandId" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_platform_brand
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="platformBrandId != null">
platform_brand_id,
</if>
<if test="platformBrandCategoryCode != null">
platform_brand_category_code,
</if>
<if test="platformBrandCategoryName != null">
platform_brand_category_name,
</if>
<if test="platformBrandName != null">
platform_brand_name,
</if>
<if test="createType != null">
create_type,
</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="platformBrandId != null">
#{platformBrandId,jdbcType=INTEGER},
</if>
<if test="platformBrandCategoryCode != null">
#{platformBrandCategoryCode,jdbcType=VARCHAR},
</if>
<if test="platformBrandCategoryName != null">
#{platformBrandCategoryName,jdbcType=VARCHAR},
</if>
<if test="platformBrandName != null">
#{platformBrandName,jdbcType=VARCHAR},
</if>
<if test="createType != null">
#{createType,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.TabPlatformBrand">
update tab_platform_brand
<set>
<if test="platformBrandCategoryCode != null">
platform_brand_category_code = #{platformBrandCategoryCode,jdbcType=VARCHAR},
</if>
<if test="platformBrandCategoryName != null">
platform_brand_category_name = #{platformBrandCategoryName,jdbcType=VARCHAR},
</if>
<if test="platformBrandName != null">
platform_brand_name = #{platformBrandName,jdbcType=VARCHAR},
</if>
<if test="createType != null">
create_type = #{createType,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 platform_brand_id = #{platformBrandId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabPlatformBrand">
update tab_platform_brand
set platform_brand_category_code = #{platformBrandCategoryCode,jdbcType=VARCHAR},
platform_brand_category_name = #{platformBrandCategoryName,jdbcType=VARCHAR},
platform_brand_name = #{platformBrandName,jdbcType=VARCHAR},
create_type = #{createType,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER}
where platform_brand_id = #{platformBrandId,jdbcType=INTEGER}
</update>
<select id="getByBrandName" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_platform_brand
where platform_brand_name = #{platformBrandName}
<if test="platformBrandId != null">
and platform_brand_id &lt;&gt; #{platformBrandId}
</if>
and status = 1
</select>
<select id="listPlatformBrand" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_platform_brand
where status = 1
<if test="createType != null ">
and create_type = #{createType}
</if>
<if test="platformBrandName != null and platformBrandName != '' ">
and platform_brand_name like concat('%', #{platformBrandName} ,'%')
</if>
<if test="platformBrandCategoryCode != null ">
and platform_brand_category_code = #{platformBrandCategoryCode}
</if>
order by create_time desc
</select>
<update id="delBrandByIds">
update tab_platform_brand set status = 0 where status = 1
<if test="null != ids">
and platform_brand_id in
<foreach close=")" collection="ids" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
</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.TabPlatformBrandRefMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabPlatformBrandRef">
<id column="platform_brand_ref_id" jdbcType="INTEGER" property="platformBrandRefId" />
<result column="platform_brand_id" jdbcType="INTEGER" property="platformBrandId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="enterprise_brand_id" jdbcType="BIGINT" property="enterpriseBrandId" />
<result column="enterprise_brand_name" jdbcType="VARCHAR" property="enterpriseBrandName" />
<result column="goods_brand_name" jdbcType="VARCHAR" property="goodsBrandName" />
<result column="enterprise_brand_code" jdbcType="VARCHAR" property="enterpriseBrandCode" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="type" jdbcType="INTEGER" property="type" />
</resultMap>
<sql id="Base_Column_List">
platform_brand_ref_id, platform_brand_id, enterprise_id, enterprise_brand_id, enterprise_brand_name,
goods_brand_name, enterprise_brand_code, create_time, update_time, status, type
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_platform_brand_ref
where platform_brand_ref_id = #{platformBrandRefId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_platform_brand_ref
where platform_brand_ref_id = #{platformBrandRefId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabPlatformBrandRef">
insert into tab_platform_brand_ref (platform_brand_ref_id, platform_brand_id,
enterprise_id, enterprise_brand_id, enterprise_brand_name,
goods_brand_name, enterprise_brand_code, create_time,
update_time, status, type
)
values (#{platformBrandRefId,jdbcType=INTEGER}, #{platformBrandId,jdbcType=INTEGER},
#{enterpriseId,jdbcType=INTEGER}, #{enterpriseBrandId,jdbcType=BIGINT}, #{enterpriseBrandName,jdbcType=VARCHAR},
#{goodsBrandName,jdbcType=VARCHAR}, #{enterpriseBrandCode,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabPlatformBrandRef">
insert into tab_platform_brand_ref
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="platformBrandRefId != null">
platform_brand_ref_id,
</if>
<if test="platformBrandId != null">
platform_brand_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="enterpriseBrandId != null">
enterprise_brand_id,
</if>
<if test="enterpriseBrandName != null">
enterprise_brand_name,
</if>
<if test="goodsBrandName != null">
goods_brand_name,
</if>
<if test="enterpriseBrandCode != null">
enterprise_brand_code,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="status != null">
status,
</if>
<if test="type != null">
type,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="platformBrandRefId != null">
#{platformBrandRefId,jdbcType=INTEGER},
</if>
<if test="platformBrandId != null">
#{platformBrandId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="enterpriseBrandId != null">
#{enterpriseBrandId,jdbcType=BIGINT},
</if>
<if test="enterpriseBrandName != null">
#{enterpriseBrandName,jdbcType=VARCHAR},
</if>
<if test="goodsBrandName != null">
#{goodsBrandName,jdbcType=VARCHAR},
</if>
<if test="enterpriseBrandCode != null">
#{enterpriseBrandCode,jdbcType=VARCHAR},
</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>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabPlatformBrandRef">
update tab_platform_brand_ref
<set>
<if test="platformBrandId != null">
platform_brand_id = #{platformBrandId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="enterpriseBrandId != null">
enterprise_brand_id = #{enterpriseBrandId,jdbcType=BIGINT},
</if>
<if test="enterpriseBrandName != null">
enterprise_brand_name = #{enterpriseBrandName,jdbcType=VARCHAR},
</if>
<if test="goodsBrandName != null">
goods_brand_name = #{goodsBrandName,jdbcType=VARCHAR},
</if>
<if test="enterpriseBrandCode != null">
enterprise_brand_code = #{enterpriseBrandCode,jdbcType=VARCHAR},
</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>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
</set>
where platform_brand_ref_id = #{platformBrandRefId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabPlatformBrandRef">
update tab_platform_brand_ref
set platform_brand_id = #{platformBrandId,jdbcType=INTEGER},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
enterprise_brand_id = #{enterpriseBrandId,jdbcType=BIGINT},
enterprise_brand_name = #{enterpriseBrandName,jdbcType=VARCHAR},
goods_brand_name = #{goodsBrandName,jdbcType=VARCHAR},
enterprise_brand_code = #{enterpriseBrandCode,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER},
type = #{type,jdbcType=INTEGER}
where platform_brand_ref_id = #{platformBrandRefId,jdbcType=INTEGER}
</update>
<select id="countByPlatformBrandId" resultType="java.lang.Integer">
select count(1) from tab_platform_brand_ref where platform_brand_id = #{platformBrandId} and status = 1
</select>
<select id="countByPlatformBrandIds" resultType="java.util.HashMap">
select platform_brand_id platformBrandId , count(1) brandCount from tab_platform_brand_ref where
status = 1
<if test="null != ids">
and platform_brand_id in
<foreach close=")" collection="ids" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
GROUP BY
platform_brand_id
</select>
<update id="delRef">
update tab_platform_brand_ref set status = 0 where enterprise_id = #{enterpriseId} and enterprise_brand_id = #{enterpriseBrandId}
</update>
<select id="listByPlatformBrandRef" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_platform_brand_ref
where status = 1
<if test="platformBrandId != null ">
and platform_brand_id = #{platformBrandId}
</if>
order by create_time desc
</select>
<update id="delRefs">
update tab_platform_brand_ref set status = 0 where enterprise_id = #{enterpriseId} and status = 1
<if test="null != ids">
and enterprise_brand_id in
<foreach close=")" collection="ids" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
</update>
<update id="updateRef">
update tab_platform_brand_ref set platform_brand_id = #{toBrandId} where status = 1 and platform_brand_id = #{fromBrandId}
</update>
<update id="updateRefs">
update tab_platform_brand_ref set platform_brand_id = #{toBrandId} where status = 1
<if test="null != ids">
and platform_brand_id in
<foreach close=")" collection="ids" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
</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.TabProjectItemMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabProjectItem">
<id column="project_item_id" jdbcType="INTEGER" property="projectItemId" />
<result column="project_item_name" jdbcType="VARCHAR" property="projectItemName" />
<result column="project_item_code" jdbcType="VARCHAR" property="projectItemCode" />
<result column="project_item_desc" jdbcType="VARCHAR" property="projectItemDesc" />
<result column="project_id" jdbcType="INTEGER" property="projectId" />
<result column="callback_url" jdbcType="VARCHAR" property="callbackUrl" />
<result column="use_status" jdbcType="INTEGER" property="useStatus" />
<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="is_platform" jdbcType="INTEGER" property="isPlatform" />
<result column="audit_expire_duration" jdbcType="INTEGER" property="auditExpireDuration" />
<result column="audit_template_type" jdbcType="INTEGER" property="auditTemplateType" />
<result column="sort" jdbcType="DOUBLE" property="sort" />
</resultMap>
<sql id="Base_Column_List">
project_item_id, project_item_name, project_item_code, project_item_desc, project_id,
callback_url, use_status, status, create_time, update_time, is_platform, audit_expire_duration,
audit_template_type, sort
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_project_item
where project_item_id = #{projectItemId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_project_item
where project_item_id = #{projectItemId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabProjectItem">
insert into tab_project_item (project_item_id, project_item_name, project_item_code,
project_item_desc, project_id, callback_url,
use_status, status, create_time,
update_time, is_platform, audit_expire_duration,
audit_template_type, sort)
values (#{projectItemId,jdbcType=INTEGER}, #{projectItemName,jdbcType=VARCHAR}, #{projectItemCode,jdbcType=VARCHAR},
#{projectItemDesc,jdbcType=VARCHAR}, #{projectId,jdbcType=INTEGER}, #{callbackUrl,jdbcType=VARCHAR},
#{useStatus,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{isPlatform,jdbcType=INTEGER}, #{auditExpireDuration,jdbcType=INTEGER},
#{auditTemplateType,jdbcType=INTEGER}, #{sort,jdbcType=DOUBLE})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabProjectItem">
<selectKey keyProperty="projectItemId" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_project_item
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="projectItemId != null">
project_item_id,
</if>
<if test="projectItemName != null">
project_item_name,
</if>
<if test="projectItemCode != null">
project_item_code,
</if>
<if test="projectItemDesc != null">
project_item_desc,
</if>
<if test="projectId != null">
project_id,
</if>
<if test="callbackUrl != null">
callback_url,
</if>
<if test="useStatus != null">
use_status,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="isPlatform != null">
is_platform,
</if>
<if test="auditExpireDuration != null">
audit_expire_duration,
</if>
<if test="auditTemplateType != null">
audit_template_type,
</if>
<if test="sort != null">
sort,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="projectItemId != null">
#{projectItemId,jdbcType=INTEGER},
</if>
<if test="projectItemName != null">
#{projectItemName,jdbcType=VARCHAR},
</if>
<if test="projectItemCode != null">
#{projectItemCode,jdbcType=VARCHAR},
</if>
<if test="projectItemDesc != null">
#{projectItemDesc,jdbcType=VARCHAR},
</if>
<if test="projectId != null">
#{projectId,jdbcType=INTEGER},
</if>
<if test="callbackUrl != null">
#{callbackUrl,jdbcType=VARCHAR},
</if>
<if test="useStatus != null">
#{useStatus,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="isPlatform != null">
#{isPlatform,jdbcType=INTEGER},
</if>
<if test="auditExpireDuration != null">
#{auditExpireDuration,jdbcType=INTEGER},
</if>
<if test="auditTemplateType != null">
#{auditTemplateType,jdbcType=INTEGER},
</if>
<if test="sort != null">
#{sort,jdbcType=DOUBLE},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabProjectItem">
update tab_project_item
<set>
<if test="projectItemName != null">
project_item_name = #{projectItemName,jdbcType=VARCHAR},
</if>
<if test="projectItemCode != null">
project_item_code = #{projectItemCode,jdbcType=VARCHAR},
</if>
<if test="projectItemDesc != null">
project_item_desc = #{projectItemDesc,jdbcType=VARCHAR},
</if>
<if test="projectId != null">
project_id = #{projectId,jdbcType=INTEGER},
</if>
<if test="callbackUrl != null">
callback_url = #{callbackUrl,jdbcType=VARCHAR},
</if>
<if test="useStatus != null">
use_status = #{useStatus,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="isPlatform != null">
is_platform = #{isPlatform,jdbcType=INTEGER},
</if>
<if test="auditExpireDuration != null">
audit_expire_duration = #{auditExpireDuration,jdbcType=INTEGER},
</if>
<if test="auditTemplateType != null">
audit_template_type = #{auditTemplateType,jdbcType=INTEGER},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=DOUBLE},
</if>
</set>
where project_item_id = #{projectItemId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabProjectItem">
update tab_project_item
set project_item_name = #{projectItemName,jdbcType=VARCHAR},
project_item_code = #{projectItemCode,jdbcType=VARCHAR},
project_item_desc = #{projectItemDesc,jdbcType=VARCHAR},
project_id = #{projectId,jdbcType=INTEGER},
callback_url = #{callbackUrl,jdbcType=VARCHAR},
use_status = #{useStatus,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
is_platform = #{isPlatform,jdbcType=INTEGER},
audit_expire_duration = #{auditExpireDuration,jdbcType=INTEGER},
audit_template_type = #{auditTemplateType,jdbcType=INTEGER},
sort = #{sort,jdbcType=DOUBLE}
where project_item_id = #{projectItemId,jdbcType=INTEGER}
</update>
<select id="getFirstProjectItem" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_project_item
where status = 1
<if test="projectItemName != null and projectItemName != '' ">
and project_item_name = #{projectItemName}
</if>
<if test="projectItemCode != null ">
and project_item_code = #{projectItemCode}
</if>
<if test="projectId != null ">
and project_id = #{projectId}
</if>
<if test="projectItemId != null ">
and project_item_id &lt;&gt; #{projectItemId}
</if>
limit 1
</select>
<select id="listProjectItem" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_project_item
where status = 1
<if test="projectId != null ">
and project_id = #{projectId}
</if>
<if test="search != null and search != '' ">
and (project_item_name like concat('%', #{search}, '%') or project_item_desc like concat('%', #{search}, '%') )
</if>
<if test="null != projectItemList">
and project_item_id in
<foreach close=")" collection="projectItemList" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
order by sort
</select>
<select id="getProjectItemCountByProjectIds" resultType="java.util.HashMap">
select
project_id projectId, count(1) itemCount
from tab_project_item
where status = 1
<if test="useStatus != null ">
and use_status = #{useStatus}
</if>
<if test="null != ids">
and project_id in
<foreach close=")" collection="ids" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
group by project_id
</select>
<select id="getByProjectItemCode" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_project_item
where status = 1
<if test="projectItemCode != null ">
and project_item_code = #{projectItemCode}
</if>
limit 1
</select>
<select id="listTwoElementExceptId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_project_item
where status = 1
and project_item_id &lt;&gt; #{projectItemId}
order by sort
limit #{start}, #{size}
</select>
<select id="getMinSort" resultType="java.lang.Double">
select sort from tab_project_item where status = 1 order by sort limit 1
</select>
<select id="getMaxSort" resultType="java.lang.Double">
select sort from tab_project_item where status = 1 order by sort desc 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.TabProjectMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabProject">
<id column="project_id" jdbcType="INTEGER" property="projectId" />
<result column="project_name" jdbcType="VARCHAR" property="projectName" />
<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="sort" jdbcType="DOUBLE" property="sort" />
</resultMap>
<sql id="Base_Column_List">
project_id, project_name, status, create_time, update_time, sort
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_project
where project_id = #{projectId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_project
where project_id = #{projectId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabProject">
insert into tab_project (project_id, project_name, status,
create_time, update_time, sort
)
values (#{projectId,jdbcType=INTEGER}, #{projectName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{sort,jdbcType=DOUBLE}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabProject">
<selectKey keyProperty="projectId" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_project
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="projectId != null">
project_id,
</if>
<if test="projectName != null">
project_name,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="sort != null">
sort,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="projectId != null">
#{projectId,jdbcType=INTEGER},
</if>
<if test="projectName != null">
#{projectName,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="sort != null">
#{sort,jdbcType=DOUBLE},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabProject">
update tab_project
<set>
<if test="projectName != null">
project_name = #{projectName,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="sort != null">
sort = #{sort,jdbcType=DOUBLE},
</if>
</set>
where project_id = #{projectId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabProject">
update tab_project
set project_name = #{projectName,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
sort = #{sort,jdbcType=DOUBLE}
where project_id = #{projectId,jdbcType=INTEGER}
</update>
<select id="getFirstProject" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_project
where status = 1
<if test="projectName != null and projectName != '' ">
and project_name = #{projectName}
</if>
<if test="projectId != null ">
and project_id &lt;&gt; #{projectId}
</if>
limit 1
</select>
<select id="listProject" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_project
where status = 1
<if test="projectName != null and projectName != '' ">
and project_name like concat('%', #{projectName}, '%')
</if>
order by sort
</select>
<select id="listTwoElementExceptId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_project
where status = 1
and project_id &lt;&gt; #{projectId}
order by sort
limit #{start}, #{size}
</select>
<select id="getMinSort" resultType="java.lang.Double">
select sort from tab_project where status = 1 order by sort limit 1
</select>
<select id="getMaxSort" resultType="java.lang.Double">
select sort from tab_project where status = 1 order by sort desc 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.TabPstnCallBillMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabPstnCallBill">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="app_id" jdbcType="VARCHAR" property="appId" />
<result column="call_id" jdbcType="VARCHAR" property="callId" />
<result column="request_id" jdbcType="VARCHAR" property="requestId" />
<result column="src" jdbcType="VARCHAR" property="src" />
<result column="dst" jdbcType="VARCHAR" property="dst" />
<result column="start_src_call_time" jdbcType="VARCHAR" property="startSrcCallTime" />
<result column="start_src_ring_time" jdbcType="VARCHAR" property="startSrcRingTime" />
<result column="src_accept_time" jdbcType="VARCHAR" property="srcAcceptTime" />
<result column="start_dst_call_time" jdbcType="VARCHAR" property="startDstCallTime" />
<result column="start_dst_ring_time" jdbcType="VARCHAR" property="startDstRingTime" />
<result column="dst_accept_time" jdbcType="VARCHAR" property="dstAcceptTime" />
<result column="end_call_time" jdbcType="VARCHAR" property="endCallTime" />
<result column="call_end_status" jdbcType="INTEGER" property="callEndStatus" />
<result column="duration" jdbcType="INTEGER" property="duration" />
<result column="call_type" jdbcType="INTEGER" property="callType" />
<result column="biz_id" jdbcType="VARCHAR" property="bizId" />
<result column="order_id" jdbcType="VARCHAR" property="orderId" />
<result column="enterprise_id" jdbcType="VARCHAR" property="enterpriseId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
<sql id="Base_Column_List">
id, app_id, call_id, request_id, src, dst, start_src_call_time, start_src_ring_time,
src_accept_time, start_dst_call_time, start_dst_ring_time, dst_accept_time, end_call_time,
call_end_status, duration, call_type, biz_id, order_id, enterprise_id, create_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_pstn_call_bill
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_pstn_call_bill
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabPstnCallBill">
insert into tab_pstn_call_bill (id, app_id, call_id,
request_id, src, dst,
start_src_call_time, start_src_ring_time, src_accept_time,
start_dst_call_time, start_dst_ring_time, dst_accept_time,
end_call_time, call_end_status, duration,
call_type, biz_id, order_id,
enterprise_id, create_time)
values (#{id,jdbcType=INTEGER}, #{appId,jdbcType=VARCHAR}, #{callId,jdbcType=VARCHAR},
#{requestId,jdbcType=VARCHAR}, #{src,jdbcType=VARCHAR}, #{dst,jdbcType=VARCHAR},
#{startSrcCallTime,jdbcType=VARCHAR}, #{startSrcRingTime,jdbcType=VARCHAR}, #{srcAcceptTime,jdbcType=VARCHAR},
#{startDstCallTime,jdbcType=VARCHAR}, #{startDstRingTime,jdbcType=VARCHAR}, #{dstAcceptTime,jdbcType=VARCHAR},
#{endCallTime,jdbcType=VARCHAR}, #{callEndStatus,jdbcType=INTEGER}, #{duration,jdbcType=INTEGER},
#{callType,jdbcType=INTEGER}, #{bizId,jdbcType=VARCHAR}, #{orderId,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabPstnCallBill">
insert into tab_pstn_call_bill
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="appId != null">
app_id,
</if>
<if test="callId != null">
call_id,
</if>
<if test="requestId != null">
request_id,
</if>
<if test="src != null">
src,
</if>
<if test="dst != null">
dst,
</if>
<if test="startSrcCallTime != null">
start_src_call_time,
</if>
<if test="startSrcRingTime != null">
start_src_ring_time,
</if>
<if test="srcAcceptTime != null">
src_accept_time,
</if>
<if test="startDstCallTime != null">
start_dst_call_time,
</if>
<if test="startDstRingTime != null">
start_dst_ring_time,
</if>
<if test="dstAcceptTime != null">
dst_accept_time,
</if>
<if test="endCallTime != null">
end_call_time,
</if>
<if test="callEndStatus != null">
call_end_status,
</if>
<if test="duration != null">
duration,
</if>
<if test="callType != null">
call_type,
</if>
<if test="bizId != null">
biz_id,
</if>
<if test="orderId != null">
order_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="appId != null">
#{appId,jdbcType=VARCHAR},
</if>
<if test="callId != null">
#{callId,jdbcType=VARCHAR},
</if>
<if test="requestId != null">
#{requestId,jdbcType=VARCHAR},
</if>
<if test="src != null">
#{src,jdbcType=VARCHAR},
</if>
<if test="dst != null">
#{dst,jdbcType=VARCHAR},
</if>
<if test="startSrcCallTime != null">
#{startSrcCallTime,jdbcType=VARCHAR},
</if>
<if test="startSrcRingTime != null">
#{startSrcRingTime,jdbcType=VARCHAR},
</if>
<if test="srcAcceptTime != null">
#{srcAcceptTime,jdbcType=VARCHAR},
</if>
<if test="startDstCallTime != null">
#{startDstCallTime,jdbcType=VARCHAR},
</if>
<if test="startDstRingTime != null">
#{startDstRingTime,jdbcType=VARCHAR},
</if>
<if test="dstAcceptTime != null">
#{dstAcceptTime,jdbcType=VARCHAR},
</if>
<if test="endCallTime != null">
#{endCallTime,jdbcType=VARCHAR},
</if>
<if test="callEndStatus != null">
#{callEndStatus,jdbcType=INTEGER},
</if>
<if test="duration != null">
#{duration,jdbcType=INTEGER},
</if>
<if test="callType != null">
#{callType,jdbcType=INTEGER},
</if>
<if test="bizId != null">
#{bizId,jdbcType=VARCHAR},
</if>
<if test="orderId != null">
#{orderId,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabPstnCallBill">
update tab_pstn_call_bill
<set>
<if test="appId != null">
app_id = #{appId,jdbcType=VARCHAR},
</if>
<if test="callId != null">
call_id = #{callId,jdbcType=VARCHAR},
</if>
<if test="requestId != null">
request_id = #{requestId,jdbcType=VARCHAR},
</if>
<if test="src != null">
src = #{src,jdbcType=VARCHAR},
</if>
<if test="dst != null">
dst = #{dst,jdbcType=VARCHAR},
</if>
<if test="startSrcCallTime != null">
start_src_call_time = #{startSrcCallTime,jdbcType=VARCHAR},
</if>
<if test="startSrcRingTime != null">
start_src_ring_time = #{startSrcRingTime,jdbcType=VARCHAR},
</if>
<if test="srcAcceptTime != null">
src_accept_time = #{srcAcceptTime,jdbcType=VARCHAR},
</if>
<if test="startDstCallTime != null">
start_dst_call_time = #{startDstCallTime,jdbcType=VARCHAR},
</if>
<if test="startDstRingTime != null">
start_dst_ring_time = #{startDstRingTime,jdbcType=VARCHAR},
</if>
<if test="dstAcceptTime != null">
dst_accept_time = #{dstAcceptTime,jdbcType=VARCHAR},
</if>
<if test="endCallTime != null">
end_call_time = #{endCallTime,jdbcType=VARCHAR},
</if>
<if test="callEndStatus != null">
call_end_status = #{callEndStatus,jdbcType=INTEGER},
</if>
<if test="duration != null">
duration = #{duration,jdbcType=INTEGER},
</if>
<if test="callType != null">
call_type = #{callType,jdbcType=INTEGER},
</if>
<if test="bizId != null">
biz_id = #{bizId,jdbcType=VARCHAR},
</if>
<if test="orderId != null">
order_id = #{orderId,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,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.TabPstnCallBill">
update tab_pstn_call_bill
set app_id = #{appId,jdbcType=VARCHAR},
call_id = #{callId,jdbcType=VARCHAR},
request_id = #{requestId,jdbcType=VARCHAR},
src = #{src,jdbcType=VARCHAR},
dst = #{dst,jdbcType=VARCHAR},
start_src_call_time = #{startSrcCallTime,jdbcType=VARCHAR},
start_src_ring_time = #{startSrcRingTime,jdbcType=VARCHAR},
src_accept_time = #{srcAcceptTime,jdbcType=VARCHAR},
start_dst_call_time = #{startDstCallTime,jdbcType=VARCHAR},
start_dst_ring_time = #{startDstRingTime,jdbcType=VARCHAR},
dst_accept_time = #{dstAcceptTime,jdbcType=VARCHAR},
end_call_time = #{endCallTime,jdbcType=VARCHAR},
call_end_status = #{callEndStatus,jdbcType=INTEGER},
duration = #{duration,jdbcType=INTEGER},
call_type = #{callType,jdbcType=INTEGER},
biz_id = #{bizId,jdbcType=VARCHAR},
order_id = #{orderId,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,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.TabPushClassifyMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabPushClassify">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="classify_name" jdbcType="VARCHAR" property="classifyName" />
<result column="classify_desc" jdbcType="VARCHAR" property="classifyDesc" />
<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">
id, classify_name, classify_desc, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_push_classify
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_push_classify
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabPushClassify">
insert into tab_push_classify (id, classify_name, classify_desc,
status, create_time, update_time
)
values (#{id,jdbcType=INTEGER}, #{classifyName,jdbcType=VARCHAR}, #{classifyDesc,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabPushClassify">
insert into tab_push_classify
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="classifyName != null">
classify_name,
</if>
<if test="classifyDesc != null">
classify_desc,
</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="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="classifyName != null">
#{classifyName,jdbcType=VARCHAR},
</if>
<if test="classifyDesc != null">
#{classifyDesc,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.TabPushClassify">
update tab_push_classify
<set>
<if test="classifyName != null">
classify_name = #{classifyName,jdbcType=VARCHAR},
</if>
<if test="classifyDesc != null">
classify_desc = #{classifyDesc,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 id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabPushClassify">
update tab_push_classify
set classify_name = #{classifyName,jdbcType=VARCHAR},
classify_desc = #{classifyDesc,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="pagePushType" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_push_classify
where status=1
<if test="search != null and search != ''">
and title like concat('%', #{search}, '%')
</if>
</select>
<select id="listPushTypeByName" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_push_classify
where status=1
and classify_name=#{name}
</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.TabPushMessageMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabPushMessage">
<id column="message_id" jdbcType="INTEGER" property="messageId" />
<result column="push_classify_id" jdbcType="INTEGER" property="pushClassifyId" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="push_type" jdbcType="INTEGER" property="pushType" />
<result column="sign" jdbcType="INTEGER" property="sign" />
<result column="push_enterprise_ids" jdbcType="VARCHAR" property="pushEnterpriseIds" />
<result column="push_time_flag" jdbcType="INTEGER" property="pushTimeFlag" />
<result column="push_time" jdbcType="TIMESTAMP" property="pushTime" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="creator" jdbcType="INTEGER" property="creator" />
<result column="creatorName" jdbcType="VARCHAR" property="creatorname" />
<result column="read_count" jdbcType="INTEGER" property="readCount" />
<result column="push_status" jdbcType="INTEGER" property="pushStatus" />
</resultMap>
<resultMap id="userMessageResult" type="com.gic.enterprise.dto.UserMessageDTO">
<id column="id" jdbcType="INTEGER" property="messageId" />
<result column="classify" jdbcType="VARCHAR" property="classify" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="sign" jdbcType="INTEGER" property="sign" />
</resultMap>
<sql id="Base_Column_List">
message_id, push_classify_id, title, content, push_type, sign, push_enterprise_ids,
push_time_flag, push_time, create_time, update_time, status, creator, creatorName,
read_count, push_status
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_push_message
where message_id = #{messageId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_push_message
where message_id = #{messageId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabPushMessage">
<selectKey keyProperty="messageId" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_push_message (message_id, push_classify_id, title,
content, push_type, sign,
push_enterprise_ids, push_time_flag, push_time,
create_time, update_time, status,
creator, creatorName, read_count,
push_status)
values (#{messageId,jdbcType=INTEGER}, #{pushClassifyId,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR},
#{content,jdbcType=VARCHAR}, #{pushType,jdbcType=INTEGER}, #{sign,jdbcType=INTEGER},
#{pushEnterpriseIds,jdbcType=VARCHAR}, #{pushTimeFlag,jdbcType=INTEGER}, #{pushTime,jdbcType=TIMESTAMP},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER},
#{creator,jdbcType=INTEGER}, #{creatorname,jdbcType=VARCHAR}, #{readCount,jdbcType=INTEGER},
#{pushStatus,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabPushMessage">
<selectKey keyProperty="messageId" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_push_message
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="messageId != null">
message_id,
</if>
<if test="pushClassifyId != null">
push_classify_id,
</if>
<if test="title != null">
title,
</if>
<if test="content != null">
content,
</if>
<if test="pushType != null">
push_type,
</if>
<if test="sign != null">
sign,
</if>
<if test="pushEnterpriseIds != null">
push_enterprise_ids,
</if>
<if test="pushTimeFlag != null">
push_time_flag,
</if>
<if test="pushTime != null">
push_time,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="status != null">
status,
</if>
<if test="creator != null">
creator,
</if>
<if test="creatorname != null">
creatorName,
</if>
<if test="readCount != null">
read_count,
</if>
<if test="pushStatus != null">
push_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="messageId != null">
#{messageId,jdbcType=INTEGER},
</if>
<if test="pushClassifyId != null">
#{pushClassifyId,jdbcType=INTEGER},
</if>
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="content != null">
#{content,jdbcType=VARCHAR},
</if>
<if test="pushType != null">
#{pushType,jdbcType=INTEGER},
</if>
<if test="sign != null">
#{sign,jdbcType=INTEGER},
</if>
<if test="pushEnterpriseIds != null">
#{pushEnterpriseIds,jdbcType=VARCHAR},
</if>
<if test="pushTimeFlag != null">
#{pushTimeFlag,jdbcType=INTEGER},
</if>
<if test="pushTime != null">
#{pushTime,jdbcType=TIMESTAMP},
</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>
<if test="creator != null">
#{creator,jdbcType=INTEGER},
</if>
<if test="creatorname != null">
#{creatorname,jdbcType=VARCHAR},
</if>
<if test="readCount != null">
#{readCount,jdbcType=INTEGER},
</if>
<if test="pushStatus != null">
#{pushStatus,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabPushMessage">
update tab_push_message
<set>
<if test="pushClassifyId != null">
push_classify_id = #{pushClassifyId,jdbcType=INTEGER},
</if>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="content != null">
content = #{content,jdbcType=VARCHAR},
</if>
<if test="pushType != null">
push_type = #{pushType,jdbcType=INTEGER},
</if>
<if test="sign != null">
sign = #{sign,jdbcType=INTEGER},
</if>
<if test="pushEnterpriseIds != null">
push_enterprise_ids = #{pushEnterpriseIds,jdbcType=VARCHAR},
</if>
<if test="pushTimeFlag != null">
push_time_flag = #{pushTimeFlag,jdbcType=INTEGER},
</if>
<if test="pushTime != null">
push_time = #{pushTime,jdbcType=TIMESTAMP},
</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>
<if test="creator != null">
creator = #{creator,jdbcType=INTEGER},
</if>
<if test="creatorname != null">
creatorName = #{creatorname,jdbcType=VARCHAR},
</if>
<if test="readCount != null">
read_count = #{readCount,jdbcType=INTEGER},
</if>
<if test="pushStatus != null">
push_status = #{pushStatus,jdbcType=INTEGER},
</if>
</set>
where message_id = #{messageId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabPushMessage">
update tab_push_message
set push_classify_id = #{pushClassifyId,jdbcType=INTEGER},
title = #{title,jdbcType=VARCHAR},
content = #{content,jdbcType=VARCHAR},
push_type = #{pushType,jdbcType=INTEGER},
sign = #{sign,jdbcType=INTEGER},
push_enterprise_ids = #{pushEnterpriseIds,jdbcType=VARCHAR},
push_time_flag = #{pushTimeFlag,jdbcType=INTEGER},
push_time = #{pushTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER},
creator = #{creator,jdbcType=INTEGER},
creatorName = #{creatorname,jdbcType=VARCHAR},
read_count = #{readCount,jdbcType=INTEGER},
push_status = #{pushStatus,jdbcType=INTEGER}
where message_id = #{messageId,jdbcType=INTEGER}
</update>
<select id="pagePushMesage" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_push_message
where status = 1
<if test="search != null and search != ''">
and (title like concat('%', #{search}, '%') or content like concat('%', #{search}, '%'))
</if>
<if test="pushStatus != null">
and push_status = #{pushStatus}
</if>
<if test="startTime != null">
and (update_time &gt;= #{startTime} or push_time &gt;= #{startTime})
</if>
<if test="endTime != null">
and (update_time &lt;= #{endTime} or push_time &lt;= #{endTime})
</if>
<if test="pushClassifyId != null">
and push_classify_id = #{pushClassifyId}
</if>
order by update_time desc
</select>
<select id="pageUserMessage" resultMap="userMessageResult">
select
t1.classify,t1.title,t1.content,t1.id,t1.create_time,t1.status, t3.sign
from tab_push_user_message t1 left join tab_push_message t3 on t1.message_id = t3.message_id
where t1.user_id=#{userId}
and (t1.status = 1 or t1.status = 2)
<if test="search != null and search != ''">
and (t1.title like concat('%', #{search}, '%') or t1.content like concat('%', #{search}, '%'))
</if>
<if test="status != null">
and t1.status = #{status}
</if>
<if test="startTime != null">
and (t1.create_time &gt;= #{startTime})
</if>
<if test="endTime != null">
and (t1.create_time &lt;= #{endTime})
</if>
<if test="classify != null and classify !=''">
and t1.classify = #{classify}
</if>
order by t1.status asc,t1.create_time desc
</select>
<update id="readCount" parameterType="com.gic.enterprise.entity.TabPushMessage">
update tab_push_message
set read_count = read_count + 1
where message_id = #{messageId,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.TabPushUserMessageMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabPushUserMessage">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="message_id" jdbcType="INTEGER" property="messageId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="classify" jdbcType="VARCHAR" property="classify" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="content" jdbcType="VARCHAR" property="content" />
</resultMap>
<sql id="Base_Column_List">
id, enterprise_id, user_id, message_id, create_time, update_time, status, classify,
title, content
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_push_user_message
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_push_user_message
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabPushUserMessage">
insert into tab_push_user_message (id, enterprise_id, user_id,
message_id, create_time, update_time,
status, classify, title,
content)
values (#{id,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER},
#{messageId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{status,jdbcType=INTEGER}, #{classify,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
#{content,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabPushUserMessage">
insert into tab_push_user_message
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="messageId != null">
message_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="status != null">
status,
</if>
<if test="classify != null">
classify,
</if>
<if test="title != null">
title,
</if>
<if test="content != null">
content,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="messageId != null">
#{messageId,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>
<if test="classify != null">
#{classify,jdbcType=VARCHAR},
</if>
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="content != null">
#{content,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabPushUserMessage">
update tab_push_user_message
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="messageId != null">
message_id = #{messageId,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>
<if test="classify != null">
classify = #{classify,jdbcType=VARCHAR},
</if>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="content != null">
content = #{content,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabPushUserMessage">
update tab_push_user_message
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
user_id = #{userId,jdbcType=INTEGER},
message_id = #{messageId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER},
classify = #{classify,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR},
content = #{content,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="recallMessage">
update tab_push_user_message
set status=0
where message_id = #{messageId,jdbcType=INTEGER} and status!=0
</update>
<select id="totalUserMessage" resultType="integer">
select count(1)
from tab_push_user_message t1 left join tab_push_message t3 on t1.message_id = t3.message_id
where t1.user_id=#{userId}
and (t1.status = 1 or t1.status = 2)
<if test="search != null and search != ''">
and (t1.title like concat('%', #{search}, '%') or t1.content like concat('%', #{search}, '%'))
</if>
<if test="status != null">
and t1.status = #{status}
</if>
<if test="startTime != null">
and (t1.create_time &gt;= #{startTime})
</if>
<if test="endTime != null">
and (t1.create_time &lt;= #{endTime})
</if>
<if test="classify != null and classify !=''">
and t1.classify = #{classify}
</if>
</select>
<update id="readAll">
update tab_push_user_message
set status=2
where user_id = #{userId,jdbcType=INTEGER} and status=1
</update>
<update id="readMessage">
update tab_push_user_message
set status=2
where status=1 and id=#{messageId}
</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.TabQrcodeDownloadMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabQrcodeDownload">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="h5" jdbcType="INTEGER" property="h5" />
<result column="applet_ids" jdbcType="VARCHAR" property="appletIds" />
<result column="fwh_ids" jdbcType="VARCHAR" property="fwhIds" />
<result column="scenes_value_ids" jdbcType="VARCHAR" property="scenesValueIds" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="custom_params" jdbcType="VARCHAR" property="customParams" />
<result column="call_back_service" jdbcType="VARCHAR" property="callBackService" />
<result column="call_back_method" jdbcType="VARCHAR" property="callBackMethod" />
<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="file_id" jdbcType="VARCHAR" property="fileId" />
<result column="qr_code_type" jdbcType="INTEGER" property="qrCodeType" />
</resultMap>
<sql id="Base_Column_List">
id, enterprise_id, h5, applet_ids, fwh_ids, scenes_value_ids, type, end_time, content,
custom_params, call_back_service, call_back_method, status, create_time, update_time,
file_id, qr_code_type
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_qrcode_download
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_qrcode_download
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabQrcodeDownload">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_qrcode_download (id, enterprise_id, h5,
applet_ids, fwh_ids, scenes_value_ids,
type, end_time, content,
custom_params, call_back_service, call_back_method,
status, create_time, update_time,
file_id, qr_code_type)
values (#{id,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{h5,jdbcType=INTEGER},
#{appletIds,jdbcType=VARCHAR}, #{fwhIds,jdbcType=VARCHAR}, #{scenesValueIds,jdbcType=VARCHAR},
#{type,jdbcType=INTEGER}, #{endTime,jdbcType=TIMESTAMP}, #{content,jdbcType=VARCHAR},
#{customParams,jdbcType=VARCHAR}, #{callBackService,jdbcType=VARCHAR}, #{callBackMethod,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{fileId,jdbcType=VARCHAR}, #{qrCodeType,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabQrcodeDownload">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_qrcode_download
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="h5 != null">
h5,
</if>
<if test="appletIds != null">
applet_ids,
</if>
<if test="fwhIds != null">
fwh_ids,
</if>
<if test="scenesValueIds != null">
scenes_value_ids,
</if>
<if test="type != null">
type,
</if>
<if test="endTime != null">
end_time,
</if>
<if test="content != null">
content,
</if>
<if test="customParams != null">
custom_params,
</if>
<if test="callBackService != null">
call_back_service,
</if>
<if test="callBackMethod != null">
call_back_method,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="fileId != null">
file_id,
</if>
<if test="qrCodeType != null">
qr_code_type,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="h5 != null">
#{h5,jdbcType=INTEGER},
</if>
<if test="appletIds != null">
#{appletIds,jdbcType=VARCHAR},
</if>
<if test="fwhIds != null">
#{fwhIds,jdbcType=VARCHAR},
</if>
<if test="scenesValueIds != null">
#{scenesValueIds,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="endTime != null">
#{endTime,jdbcType=TIMESTAMP},
</if>
<if test="content != null">
#{content,jdbcType=VARCHAR},
</if>
<if test="customParams != null">
#{customParams,jdbcType=VARCHAR},
</if>
<if test="callBackService != null">
#{callBackService,jdbcType=VARCHAR},
</if>
<if test="callBackMethod != null">
#{callBackMethod,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="fileId != null">
#{fileId,jdbcType=VARCHAR},
</if>
<if test="qrCodeType != null">
#{qrCodeType,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabQrcodeDownload">
update tab_qrcode_download
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="h5 != null">
h5 = #{h5,jdbcType=INTEGER},
</if>
<if test="appletIds != null">
applet_ids = #{appletIds,jdbcType=VARCHAR},
</if>
<if test="fwhIds != null">
fwh_ids = #{fwhIds,jdbcType=VARCHAR},
</if>
<if test="scenesValueIds != null">
scenes_value_ids = #{scenesValueIds,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="endTime != null">
end_time = #{endTime,jdbcType=TIMESTAMP},
</if>
<if test="content != null">
content = #{content,jdbcType=VARCHAR},
</if>
<if test="customParams != null">
custom_params = #{customParams,jdbcType=VARCHAR},
</if>
<if test="callBackService != null">
call_back_service = #{callBackService,jdbcType=VARCHAR},
</if>
<if test="callBackMethod != null">
call_back_method = #{callBackMethod,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="fileId != null">
file_id = #{fileId,jdbcType=VARCHAR},
</if>
<if test="qrCodeType != null">
qr_code_type = #{qrCodeType,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabQrcodeDownload">
update tab_qrcode_download
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
h5 = #{h5,jdbcType=INTEGER},
applet_ids = #{appletIds,jdbcType=VARCHAR},
fwh_ids = #{fwhIds,jdbcType=VARCHAR},
scenes_value_ids = #{scenesValueIds,jdbcType=VARCHAR},
type = #{type,jdbcType=INTEGER},
end_time = #{endTime,jdbcType=TIMESTAMP},
content = #{content,jdbcType=VARCHAR},
custom_params = #{customParams,jdbcType=VARCHAR},
call_back_service = #{callBackService,jdbcType=VARCHAR},
call_back_method = #{callBackMethod,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
file_id = #{fileId,jdbcType=VARCHAR},
qr_code_type = #{qrCodeType,jdbcType=INTEGER}
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.TabQrcodeScenesClassifyMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabQrcodeScenesClassify">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="classify_name" jdbcType="VARCHAR" property="classifyName" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<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">
id, classify_name, enterprise_id, create_time, update_time, status
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_qrcode_scenes_classify
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_qrcode_scenes_classify
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabQrcodeScenesClassify">
insert into tab_qrcode_scenes_classify (id, classify_name, enterprise_id,
create_time, update_time, status
)
values (#{id,jdbcType=INTEGER}, #{classifyName,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabQrcodeScenesClassify">
insert into tab_qrcode_scenes_classify
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="classifyName != null">
classify_name,
</if>
<if test="enterpriseId != null">
enterprise_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="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="classifyName != null">
#{classifyName,jdbcType=VARCHAR},
</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>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabQrcodeScenesClassify">
update tab_qrcode_scenes_classify
<set>
<if test="classifyName != null">
classify_name = #{classifyName,jdbcType=VARCHAR},
</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>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabQrcodeScenesClassify">
update tab_qrcode_scenes_classify
set classify_name = #{classifyName,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="listQrCodeScenesClassify" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_qrcode_scenes_classify
where (enterprise_id = #{enterpriseId,jdbcType=INTEGER} or enterprise_id=-1)
<if test="search != null and search != ''">
and classify_name like concat('%',#{search}, '%') and status=1
</if>
order by enterprise_id asc,update_time desc
</select>
<select id="listByName" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_qrcode_scenes_classify
where (enterprise_id = #{enterpriseId,jdbcType=INTEGER} or enterprise_id=-1)
and classify_name =#{name}
and status=1
order by enterprise_id asc,update_time desc
</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.TabQrcodeScenesMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabQrcodeScenes">
<id column="scenes_id" jdbcType="INTEGER" property="scenesId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="scenes_name" jdbcType="VARCHAR" property="scenesName" />
<result column="scenes_classify_id" jdbcType="INTEGER" property="scenesClassifyId" />
<result column="scenes_desc" jdbcType="VARCHAR" property="scenesDesc" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="status" jdbcType="INTEGER" property="status" />
</resultMap>
<resultMap id="DTOResultMap" type="com.gic.enterprise.dto.QrcodeScenesDTO" extends="BaseResultMap">
<result column="classify_name" jdbcType="VARCHAR" property="scenesClassifyName" />
</resultMap>
<sql id="Base_Column_List">
scenes_id, enterprise_id, scenes_name, scenes_classify_id, scenes_desc, create_time,
update_time, status
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_qrcode_scenes
where scenes_id = #{scenesId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_qrcode_scenes
where scenes_id = #{scenesId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabQrcodeScenes">
insert into tab_qrcode_scenes (scenes_id, enterprise_id, scenes_name,
scenes_classify_id, scenes_desc, create_time,
update_time, status)
values (#{scenesId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{scenesName,jdbcType=VARCHAR},
#{scenesClassifyId,jdbcType=INTEGER}, #{scenesDesc,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabQrcodeScenes">
insert into tab_qrcode_scenes
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="scenesId != null">
scenes_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="scenesName != null">
scenes_name,
</if>
<if test="scenesClassifyId != null">
scenes_classify_id,
</if>
<if test="scenesDesc != null">
scenes_desc,
</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="scenesId != null">
#{scenesId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="scenesName != null">
#{scenesName,jdbcType=VARCHAR},
</if>
<if test="scenesClassifyId != null">
#{scenesClassifyId,jdbcType=INTEGER},
</if>
<if test="scenesDesc != null">
#{scenesDesc,jdbcType=VARCHAR},
</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.TabQrcodeScenes">
update tab_qrcode_scenes
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="scenesName != null">
scenes_name = #{scenesName,jdbcType=VARCHAR},
</if>
<if test="scenesClassifyId != null">
scenes_classify_id = #{scenesClassifyId,jdbcType=INTEGER},
</if>
<if test="scenesDesc != null">
scenes_desc = #{scenesDesc,jdbcType=VARCHAR},
</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 scenes_id = #{scenesId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabQrcodeScenes">
update tab_qrcode_scenes
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
scenes_name = #{scenesName,jdbcType=VARCHAR},
scenes_classify_id = #{scenesClassifyId,jdbcType=INTEGER},
scenes_desc = #{scenesDesc,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER}
where scenes_id = #{scenesId,jdbcType=INTEGER}
</update>
<select id="listQrCodeScenes" resultMap="DTOResultMap">
select
t1.scenes_id, t1.enterprise_id, t1.scenes_name, t1.scenes_classify_id, t1.scenes_desc, t1.status,t2.classify_name
from tab_qrcode_scenes t1, tab_qrcode_scenes_classify t2
where t1.enterprise_id = #{enterpriseId,jdbcType=INTEGER} and t1.status in(1,2)
and t1.scenes_classify_id = t2.id
<if test="search != null and search != ''">
and t1.scenes_name like concat('%',#{search},'%')
</if>
<if test="classifyId != null">
and t1.scenes_classify_id = #{classifyId}
</if>
order by t1.update_time desc
</select>
<update id="updateScenesStatus">
update tab_qrcode_scenes
set status = #{status,jdbcType=INTEGER}
where scenes_id = #{scenesId,jdbcType=INTEGER}
</update>
<select id="listQrcodeScenesByName" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_qrcode_scenes
where enterprise_id = #{enterpriseId,jdbcType=INTEGER} and status=1
<if test="name != null and name != ''">
and scenes_name = #{name}
</if>
order by update_time desc
</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.TabQrcodeScenesValueMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabQrcodeScenesValue">
<id column="value_id" jdbcType="INTEGER" property="valueId" />
<result column="scenes_id" jdbcType="INTEGER" property="scenesId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="name" jdbcType="VARCHAR" property="name" />
<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">
value_id, scenes_id, enterprise_id, code, name, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_qrcode_scenes_value
where value_id = #{valueId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_qrcode_scenes_value
where value_id = #{valueId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabQrcodeScenesValue">
insert into tab_qrcode_scenes_value (value_id, scenes_id, enterprise_id,
code, name, status,
create_time, update_time)
values (#{valueId,jdbcType=INTEGER}, #{scenesId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
#{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabQrcodeScenesValue">
insert into tab_qrcode_scenes_value
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="valueId != null">
value_id,
</if>
<if test="scenesId != null">
scenes_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="code != null">
code,
</if>
<if test="name != null">
name,
</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="valueId != null">
#{valueId,jdbcType=INTEGER},
</if>
<if test="scenesId != null">
#{scenesId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,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.TabQrcodeScenesValue">
update tab_qrcode_scenes_value
<set>
<if test="scenesId != null">
scenes_id = #{scenesId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,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 value_id = #{valueId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabQrcodeScenesValue">
update tab_qrcode_scenes_value
set scenes_id = #{scenesId,jdbcType=INTEGER},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
code = #{code,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where value_id = #{valueId,jdbcType=INTEGER}
</update>
<select id="listQrcodeScenesValue" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_qrcode_scenes_value
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
and status = 1
<if test="scenesId != null">
and scenes_id = #{scenesId,jdbcType=INTEGER}
</if>
<if test="search != null and search != ''">
and (code like concat('%',#{search}, '%') or name like concat('%', #{search}, '%'))
</if>
order by create_time desc
</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.TabRiskModeMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabRiskMode">
<id column="risk_mode_id" jdbcType="INTEGER" property="riskModeId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="apply_user_id" jdbcType="INTEGER" property="applyUserId" />
<result column="apply_time" jdbcType="TIMESTAMP" property="applyTime" />
<result column="apply_reason" jdbcType="VARCHAR" property="applyReason" />
<result column="duration_code" jdbcType="INTEGER" property="durationCode" />
<result column="audit_result" jdbcType="INTEGER" property="auditResult" />
<result column="audit_reason" jdbcType="VARCHAR" property="auditReason" />
<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">
risk_mode_id, enterprise_id, apply_user_id, apply_time, apply_reason, duration_code,
audit_result, audit_reason, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_risk_mode
where risk_mode_id = #{riskModeId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_risk_mode
where risk_mode_id = #{riskModeId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabRiskMode">
insert into tab_risk_mode (risk_mode_id, enterprise_id, apply_user_id,
apply_time, apply_reason, duration_code,
audit_result, audit_reason, status,
create_time, update_time)
values (#{riskModeId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{applyUserId,jdbcType=INTEGER},
#{applyTime,jdbcType=TIMESTAMP}, #{applyReason,jdbcType=VARCHAR}, #{durationCode,jdbcType=INTEGER},
#{auditResult,jdbcType=INTEGER}, #{auditReason,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabRiskMode">
<selectKey keyProperty="riskModeId" order="AFTER" resultType="java.lang.Integer">
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_risk_mode
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="riskModeId != null">
risk_mode_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="applyUserId != null">
apply_user_id,
</if>
<if test="applyTime != null">
apply_time,
</if>
<if test="applyReason != null">
apply_reason,
</if>
<if test="durationCode != null">
duration_code,
</if>
<if test="auditResult != null">
audit_result,
</if>
<if test="auditReason != null">
audit_reason,
</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="riskModeId != null">
#{riskModeId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="applyUserId != null">
#{applyUserId,jdbcType=INTEGER},
</if>
<if test="applyTime != null">
#{applyTime,jdbcType=TIMESTAMP},
</if>
<if test="applyReason != null">
#{applyReason,jdbcType=VARCHAR},
</if>
<if test="durationCode != null">
#{durationCode,jdbcType=INTEGER},
</if>
<if test="auditResult != null">
#{auditResult,jdbcType=INTEGER},
</if>
<if test="auditReason != null">
#{auditReason,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.TabRiskMode">
update tab_risk_mode
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="applyUserId != null">
apply_user_id = #{applyUserId,jdbcType=INTEGER},
</if>
<if test="applyTime != null">
apply_time = #{applyTime,jdbcType=TIMESTAMP},
</if>
<if test="applyReason != null">
apply_reason = #{applyReason,jdbcType=VARCHAR},
</if>
<if test="durationCode != null">
duration_code = #{durationCode,jdbcType=INTEGER},
</if>
<if test="auditResult != null">
audit_result = #{auditResult,jdbcType=INTEGER},
</if>
<if test="auditReason != null">
audit_reason = #{auditReason,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 risk_mode_id = #{riskModeId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabRiskMode">
update tab_risk_mode
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
apply_user_id = #{applyUserId,jdbcType=INTEGER},
apply_time = #{applyTime,jdbcType=TIMESTAMP},
apply_reason = #{applyReason,jdbcType=VARCHAR},
duration_code = #{durationCode,jdbcType=INTEGER},
audit_result = #{auditResult,jdbcType=INTEGER},
audit_reason = #{auditReason,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where risk_mode_id = #{riskModeId,jdbcType=INTEGER}
</update>
<select id="getLastWaitAuditByApplyUser" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_risk_mode
where status = 1
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="applyUserId != null ">
and apply_user_id = #{applyUserId}
</if>
order by create_time desc
limit 1
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!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"> <mapper namespace="com.gic.cloud.dao.mapper.TabSysAccountGroupMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabDataActuallyPaidConfig"> <resultMap id="BaseResultMap" type="com.gic.cloud.entity.TabSysAccountGroup">
<id column="actually_paid_config_id" jdbcType="INTEGER" property="actuallyPaidConfigId" /> <id column="account_group_id" jdbcType="INTEGER" property="accountGroupId" />
<result column="account_group_name" jdbcType="VARCHAR" property="accountGroupName" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" /> <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="status" jdbcType="INTEGER" property="status" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
actually_paid_config_id, enterprise_id, classify, config_status, status, create_time, account_group_id, account_group_name, enterprise_id, status, sort, create_time, update_time
update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_data_actually_paid_config from tab_sys_account_group
where actually_paid_config_id = #{actuallyPaidConfigId,jdbcType=INTEGER} where account_group_id = #{accountGroupId,jdbcType=INTEGER}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_data_actually_paid_config delete from tab_sys_account_group
where actually_paid_config_id = #{actuallyPaidConfigId,jdbcType=INTEGER} where account_group_id = #{accountGroupId,jdbcType=INTEGER}
</delete> </delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabDataActuallyPaidConfig" useGeneratedKeys="true" keyProperty="actuallyPaidConfigId"> <insert id="insert" parameterType="com.gic.cloud.entity.TabSysAccountGroup" useGeneratedKeys="true" keyProperty="accountGroupId">
insert into tab_data_actually_paid_config (actually_paid_config_id, enterprise_id, insert into tab_sys_account_group (account_group_id, account_group_name,
classify, config_status, status, enterprise_id, status, sort,
create_time, update_time) create_time, update_time)
values (#{actuallyPaidConfigId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, values (#{accountGroupId,jdbcType=INTEGER}, #{accountGroupName,jdbcType=VARCHAR},
#{classify,jdbcType=INTEGER}, #{configStatus,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabDataActuallyPaidConfig"> <insert id="insertSelective" parameterType="com.gic.cloud.entity.TabSysAccountGroup">
insert into tab_data_actually_paid_config insert into tab_sys_account_group
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="actuallyPaidConfigId != null"> <if test="accountGroupId != null">
actually_paid_config_id, account_group_id,
</if>
<if test="accountGroupName != null">
account_group_name,
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id, enterprise_id,
</if> </if>
<if test="classify != null">
classify,
</if>
<if test="configStatus != null">
config_status,
</if>
<if test="status != null"> <if test="status != null">
status, status,
</if> </if>
<if test="sort != null">
sort,
</if>
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
...@@ -58,21 +57,21 @@ ...@@ -58,21 +57,21 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="actuallyPaidConfigId != null"> <if test="accountGroupId != null">
#{actuallyPaidConfigId,jdbcType=INTEGER}, #{accountGroupId,jdbcType=INTEGER},
</if>
<if test="accountGroupName != null">
#{accountGroupName,jdbcType=VARCHAR},
</if> </if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
</if> </if>
<if test="classify != null">
#{classify,jdbcType=INTEGER},
</if>
<if test="configStatus != null">
#{configStatus,jdbcType=INTEGER},
</if>
<if test="status != null"> <if test="status != null">
#{status,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
</if> </if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="createTime != null"> <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
...@@ -81,21 +80,21 @@ ...@@ -81,21 +80,21 @@
</if> </if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabDataActuallyPaidConfig"> <update id="updateByPrimaryKeySelective" parameterType="com.gic.cloud.entity.TabSysAccountGroup">
update tab_data_actually_paid_config update tab_sys_account_group
<set> <set>
<if test="accountGroupName != null">
account_group_name = #{accountGroupName,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null"> <if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER}, enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if> </if>
<if test="classify != null">
classify = #{classify,jdbcType=INTEGER},
</if>
<if test="configStatus != null">
config_status = #{configStatus,jdbcType=INTEGER},
</if>
<if test="status != null"> <if test="status != null">
status = #{status,jdbcType=INTEGER}, status = #{status,jdbcType=INTEGER},
</if> </if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
...@@ -103,31 +102,47 @@ ...@@ -103,31 +102,47 @@
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
</set> </set>
where actually_paid_config_id = #{actuallyPaidConfigId,jdbcType=INTEGER} where account_group_id = #{accountGroupId,jdbcType=INTEGER}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabDataActuallyPaidConfig"> <update id="updateByPrimaryKey" parameterType="com.gic.cloud.entity.TabSysAccountGroup">
update tab_data_actually_paid_config update tab_sys_account_group
set enterprise_id = #{enterpriseId,jdbcType=INTEGER}, set account_group_name = #{accountGroupName,jdbcType=VARCHAR},
classify = #{classify,jdbcType=INTEGER}, enterprise_id = #{enterpriseId,jdbcType=INTEGER},
config_status = #{configStatus,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER}, status = #{status,jdbcType=INTEGER},
sort = #{sort,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where actually_paid_config_id = #{actuallyPaidConfigId,jdbcType=INTEGER} where account_group_id = #{accountGroupId,jdbcType=INTEGER}
</update> </update>
<select id="listByEnterpriseId" resultMap="BaseResultMap"> <select id="countByAccountGroupName" resultType="int">
select <include refid="Base_Column_List"></include> SELECT count(1) from tab_sys_account_group
from tab_data_actually_paid_config
where enterprise_id = #{enterpriseId} where enterprise_id = #{enterpriseId}
and account_group_name = #{accountGroupName}
<if test="accountGroupId != null">
and account_group_id &lt;&gt; #{accountGroupId}
</if>
and status = 1 and status = 1
order by classify
</select> </select>
<update id="delete"> <select id="queryMaxSort" resultType="int">
update tab_data_actually_paid_config set status = 0 select ifnull(max(sort),0) from tab_sys_account_group
where enterprise_id = #{enterpriseId} where enterprise_id = #{enterpriseId}
and classify = #{classify} and status = 1
</select>
<select id="listAccountGroupOrderBySort" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_sys_account_group
where enterprise_id = #{enterpriseId}
and status = 1
order by sort
</select>
<update id="deleteAccountGroup">
update tab_sys_account_group set status = 0
where account_group_id = #{accountGroupId}
and status = 1 and status = 1
</update> </update>
</mapper> </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.TabTodoItemMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabTodoItem">
<id column="todo_item_id" jdbcType="INTEGER" property="todoItemId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="item_content" jdbcType="VARCHAR" property="itemContent" />
<result column="finish" jdbcType="INTEGER" property="finish" />
<result column="item_type" jdbcType="VARCHAR" property="itemType" />
<result column="finish_time" jdbcType="TIMESTAMP" property="finishTime" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="item_info_url" jdbcType="VARCHAR" property="itemInfoUrl" />
</resultMap>
<sql id="Base_Column_List">
todo_item_id, enterprise_id, user_id, item_content, finish, item_type, finish_time,
create_time, update_time, status, item_info_url
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_todo_item
where todo_item_id = #{todoItemId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_todo_item
where todo_item_id = #{todoItemId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabTodoItem">
insert into tab_todo_item (todo_item_id, enterprise_id, user_id,
item_content, finish, item_type,
finish_time, create_time, update_time,
status, item_info_url)
values (#{todoItemId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER},
#{itemContent,jdbcType=VARCHAR}, #{finish,jdbcType=INTEGER}, #{itemType,jdbcType=VARCHAR},
#{finishTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{status,jdbcType=INTEGER}, #{itemInfoUrl,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabTodoItem">
insert into tab_todo_item
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="todoItemId != null">
todo_item_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="itemContent != null">
item_content,
</if>
<if test="finish != null">
finish,
</if>
<if test="itemType != null">
item_type,
</if>
<if test="finishTime != null">
finish_time,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="status != null">
status,
</if>
<if test="itemInfoUrl != null">
item_info_url,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="todoItemId != null">
#{todoItemId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="itemContent != null">
#{itemContent,jdbcType=VARCHAR},
</if>
<if test="finish != null">
#{finish,jdbcType=INTEGER},
</if>
<if test="itemType != null">
#{itemType,jdbcType=VARCHAR},
</if>
<if test="finishTime != null">
#{finishTime,jdbcType=TIMESTAMP},
</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>
<if test="itemInfoUrl != null">
#{itemInfoUrl,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabTodoItem">
update tab_todo_item
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="itemContent != null">
item_content = #{itemContent,jdbcType=VARCHAR},
</if>
<if test="finish != null">
finish = #{finish,jdbcType=INTEGER},
</if>
<if test="itemType != null">
item_type = #{itemType,jdbcType=VARCHAR},
</if>
<if test="finishTime != null">
finish_time = #{finishTime,jdbcType=TIMESTAMP},
</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>
<if test="itemInfoUrl != null">
item_info_url = #{itemInfoUrl,jdbcType=VARCHAR},
</if>
</set>
where todo_item_id = #{todoItemId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabTodoItem">
update tab_todo_item
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
user_id = #{userId,jdbcType=INTEGER},
item_content = #{itemContent,jdbcType=VARCHAR},
finish = #{finish,jdbcType=INTEGER},
item_type = #{itemType,jdbcType=VARCHAR},
finish_time = #{finishTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER},
item_info_url = #{itemInfoUrl,jdbcType=VARCHAR}
where todo_item_id = #{todoItemId,jdbcType=INTEGER}
</update>
<select id="getBySelective" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_todo_item
where status = 1
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="userId != null ">
and user_id = #{userId}
</if>
<if test="itemType != null ">
and item_type = #{itemType}
</if>
<if test="itemInfoUrl != null and itemInfoUrl != '' ">
and item_info_url = #{itemInfoUrl}
</if>
limit 1
</select>
<update id="finishTodoItem">
update tab_todo_item
set finish = 1, finish_time = now()
where status = 1
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<!-- <if test="userId != null ">
and user_id = #{userId}
</if>-->
<if test="itemType != null ">
and item_type = #{itemType}
</if>
<if test="itemInfoUrl != null and itemInfoUrl != '' ">
and item_info_url = #{itemInfoUrl}
</if>
</update>
<select id="listTodoItem" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_todo_item
where status = 1
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="userId != null ">
and user_id = #{userId}
</if>
<if test="finish != null ">
and finish = #{finish}
</if>
<if test="itemType != null and itemType != '' ">
and item_type = #{itemType}
</if>
<if test="search != null and search != '' ">
and item_content like concat('%', #{search}, '%')
</if>
<if test="startTime != null and startTime != '' ">
and create_time &gt; #{startTime}
</if>
<if test="endTime != null and endTime != '' ">
and create_time &lt; #{endTime}
</if>
order by create_time desc
</select>
<select id="getUnFinishCount" resultType="int">
select
count(1)
from tab_todo_item
where status = 1
and finish = 0
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="userId != null ">
and user_id = #{userId}
</if>
<if test="finish != null ">
and finish = #{finish}
</if>
<if test="itemType != null and itemType != '' ">
and item_type = #{itemType}
</if>
<if test="search != null and search != '' ">
and search like concat('%', #{search}, '%')
</if>
<if test="startTime != null and startTime != '' ">
and create_time &gt; #{startTime}
</if>
<if test="endTime != null and endTime != '' ">
and create_time &lt; #{endTime}
</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.TabWmMemberCardConfigMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabWmMemberCardConfig">
<id column="member_card_config_id" jdbcType="INTEGER" property="memberCardConfigId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="wm_main_account" jdbcType="VARCHAR" property="wmMainAccount" />
<result column="open_card_mode" jdbcType="INTEGER" property="openCardMode" />
<result column="gic_member_to_wm" jdbcType="INTEGER" property="gicMemberToWm" />
<result column="wm_member_clerk_to_gic" jdbcType="INTEGER" property="wmMemberClerkToGic" />
<result column="wm_member_to_gic" jdbcType="INTEGER" property="wmMemberToGic" />
<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">
member_card_config_id, enterprise_id, wm_main_account, open_card_mode, gic_member_to_wm,
wm_member_clerk_to_gic, wm_member_to_gic, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_wm_member_card_config
where member_card_config_id = #{memberCardConfigId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_wm_member_card_config
where member_card_config_id = #{memberCardConfigId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabWmMemberCardConfig" useGeneratedKeys="true" keyProperty="memberCardConfigId">
insert into tab_wm_member_card_config (member_card_config_id, enterprise_id,
wm_main_account, open_card_mode, gic_member_to_wm,
wm_member_clerk_to_gic, wm_member_to_gic, status,
create_time, update_time)
values (#{memberCardConfigId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
#{wmMainAccount,jdbcType=VARCHAR}, #{openCardMode,jdbcType=INTEGER}, #{gicMemberToWm,jdbcType=INTEGER},
#{wmMemberClerkToGic,jdbcType=INTEGER}, #{wmMemberToGic,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabWmMemberCardConfig">
insert into tab_wm_member_card_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="memberCardConfigId != null">
member_card_config_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="wmMainAccount != null">
wm_main_account,
</if>
<if test="openCardMode != null">
open_card_mode,
</if>
<if test="gicMemberToWm != null">
gic_member_to_wm,
</if>
<if test="wmMemberClerkToGic != null">
wm_member_clerk_to_gic,
</if>
<if test="wmMemberToGic != null">
wm_member_to_gic,
</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="memberCardConfigId != null">
#{memberCardConfigId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="wmMainAccount != null">
#{wmMainAccount,jdbcType=VARCHAR},
</if>
<if test="openCardMode != null">
#{openCardMode,jdbcType=INTEGER},
</if>
<if test="gicMemberToWm != null">
#{gicMemberToWm,jdbcType=INTEGER},
</if>
<if test="wmMemberClerkToGic != null">
#{wmMemberClerkToGic,jdbcType=INTEGER},
</if>
<if test="wmMemberToGic != null">
#{wmMemberToGic,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.TabWmMemberCardConfig">
update tab_wm_member_card_config
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="wmMainAccount != null">
wm_main_account = #{wmMainAccount,jdbcType=VARCHAR},
</if>
<if test="openCardMode != null">
open_card_mode = #{openCardMode,jdbcType=INTEGER},
</if>
<if test="gicMemberToWm != null">
gic_member_to_wm = #{gicMemberToWm,jdbcType=INTEGER},
</if>
<if test="wmMemberClerkToGic != null">
wm_member_clerk_to_gic = #{wmMemberClerkToGic,jdbcType=INTEGER},
</if>
<if test="wmMemberToGic != null">
wm_member_to_gic = #{wmMemberToGic,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 member_card_config_id = #{memberCardConfigId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabWmMemberCardConfig">
update tab_wm_member_card_config
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
wm_main_account = #{wmMainAccount,jdbcType=VARCHAR},
open_card_mode = #{openCardMode,jdbcType=INTEGER},
gic_member_to_wm = #{gicMemberToWm,jdbcType=INTEGER},
wm_member_clerk_to_gic = #{wmMemberClerkToGic,jdbcType=INTEGER},
wm_member_to_gic = #{wmMemberToGic,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where member_card_config_id = #{memberCardConfigId,jdbcType=INTEGER}
</update>
<select id="getByWmMainAccount" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_wm_member_card_config
where wm_main_account = #{wmMainAccount}
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.TabWmOrderConfigMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabWmOrderConfig">
<id column="order_config_id" jdbcType="INTEGER" property="orderConfigId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="wm_main_account" jdbcType="VARCHAR" property="wmMainAccount" />
<result column="wm_order_to_offline" jdbcType="INTEGER" property="wmOrderToOffline" />
<result column="offline_differentiate_wm" jdbcType="INTEGER" property="offlineDifferentiateWm" />
<result column="order_from_mode" jdbcType="INTEGER" property="orderFromMode" />
<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">
order_config_id, enterprise_id, wm_main_account, wm_order_to_offline, offline_differentiate_wm,
order_from_mode, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_wm_order_config
where order_config_id = #{orderConfigId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_wm_order_config
where order_config_id = #{orderConfigId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabWmOrderConfig" useGeneratedKeys="true" keyProperty="orderConfigId">
insert into tab_wm_order_config (order_config_id, enterprise_id, wm_main_account,
wm_order_to_offline, offline_differentiate_wm,
order_from_mode, status, create_time,
update_time)
values (#{orderConfigId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{wmMainAccount,jdbcType=VARCHAR},
#{wmOrderToOffline,jdbcType=INTEGER}, #{offlineDifferentiateWm,jdbcType=INTEGER},
#{orderFromMode,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabWmOrderConfig">
insert into tab_wm_order_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orderConfigId != null">
order_config_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="wmMainAccount != null">
wm_main_account,
</if>
<if test="wmOrderToOffline != null">
wm_order_to_offline,
</if>
<if test="offlineDifferentiateWm != null">
offline_differentiate_wm,
</if>
<if test="orderFromMode != null">
order_from_mode,
</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="orderConfigId != null">
#{orderConfigId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="wmMainAccount != null">
#{wmMainAccount,jdbcType=VARCHAR},
</if>
<if test="wmOrderToOffline != null">
#{wmOrderToOffline,jdbcType=INTEGER},
</if>
<if test="offlineDifferentiateWm != null">
#{offlineDifferentiateWm,jdbcType=INTEGER},
</if>
<if test="orderFromMode != null">
#{orderFromMode,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.TabWmOrderConfig">
update tab_wm_order_config
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="wmMainAccount != null">
wm_main_account = #{wmMainAccount,jdbcType=VARCHAR},
</if>
<if test="wmOrderToOffline != null">
wm_order_to_offline = #{wmOrderToOffline,jdbcType=INTEGER},
</if>
<if test="offlineDifferentiateWm != null">
offline_differentiate_wm = #{offlineDifferentiateWm,jdbcType=INTEGER},
</if>
<if test="orderFromMode != null">
order_from_mode = #{orderFromMode,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 order_config_id = #{orderConfigId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabWmOrderConfig">
update tab_wm_order_config
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
wm_main_account = #{wmMainAccount,jdbcType=VARCHAR},
wm_order_to_offline = #{wmOrderToOffline,jdbcType=INTEGER},
offline_differentiate_wm = #{offlineDifferentiateWm,jdbcType=INTEGER},
order_from_mode = #{orderFromMode,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where order_config_id = #{orderConfigId,jdbcType=INTEGER}
</update>
<select id="getByWmMainAccount" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
FROM tab_wm_order_config
where status = 1
and wm_main_account = #{wmMainAccount}
</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.TabWmStoreConfigMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabWmStoreConfig">
<id column="store_config_id" jdbcType="INTEGER" property="storeConfigId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="wm_mall_store_id" jdbcType="INTEGER" property="wmMallStoreId" />
<result column="store_config_type" jdbcType="INTEGER" property="storeConfigType" />
<result column="store_config_json" jdbcType="VARCHAR" property="storeConfigJson" />
<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">
store_config_id, enterprise_id, wm_mall_store_id, store_config_type, store_config_json,
status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_wm_store_config
where store_config_id = #{storeConfigId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_wm_store_config
where store_config_id = #{storeConfigId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabWmStoreConfig" useGeneratedKeys="true" keyProperty="storeConfigId">
insert into tab_wm_store_config (store_config_id, enterprise_id, wm_mall_store_id,
store_config_type, store_config_json, status,
create_time, update_time)
values (#{storeConfigId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{wmMallStoreId,jdbcType=INTEGER},
#{storeConfigType,jdbcType=INTEGER}, #{storeConfigJson,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabWmStoreConfig">
insert into tab_wm_store_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="storeConfigId != null">
store_config_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="wmMallStoreId != null">
wm_mall_store_id,
</if>
<if test="storeConfigType != null">
store_config_type,
</if>
<if test="storeConfigJson != null">
store_config_json,
</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="storeConfigId != null">
#{storeConfigId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="wmMallStoreId != null">
#{wmMallStoreId,jdbcType=INTEGER},
</if>
<if test="storeConfigType != null">
#{storeConfigType,jdbcType=INTEGER},
</if>
<if test="storeConfigJson != null">
#{storeConfigJson,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.TabWmStoreConfig">
update tab_wm_store_config
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="wmMallStoreId != null">
wm_mall_store_id = #{wmMallStoreId,jdbcType=INTEGER},
</if>
<if test="storeConfigType != null">
store_config_type = #{storeConfigType,jdbcType=INTEGER},
</if>
<if test="storeConfigJson != null">
store_config_json = #{storeConfigJson,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 store_config_id = #{storeConfigId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabWmStoreConfig">
update tab_wm_store_config
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
wm_mall_store_id = #{wmMallStoreId,jdbcType=INTEGER},
store_config_type = #{storeConfigType,jdbcType=INTEGER},
store_config_json = #{storeConfigJson,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where store_config_id = #{storeConfigId,jdbcType=INTEGER}
</update>
<select id="getWmStoreConfig" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_wm_store_config
where wm_mall_store_id = #{wmMallStoreId}
and status = 1
and store_config_type = #{storeConfigType}
</select>
<select id="listWmStoreConfig" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_wm_store_config
where wm_mall_store_id = #{wmMallStoreId}
and status = 1
order by store_config_type
</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.TabWmStoreCouponConfigMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabWmStoreCouponConfig">
<id column="coupon_config_id" jdbcType="INTEGER" property="couponConfigId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="wm_mall_store_id" jdbcType="INTEGER" property="wmMallStoreId" />
<result column="gic_coupon_id" jdbcType="VARCHAR" property="gicCouponId" />
<result column="gic_coupon_name" jdbcType="VARCHAR" property="gicCouponName" />
<result column="wm_coupon_id" jdbcType="VARCHAR" property="wmCouponId" />
<result column="wm_coupon_name" jdbcType="VARCHAR" property="wmCouponName" />
<result column="gic_coupon_expire" jdbcType="TIMESTAMP" property="gicCouponExpire" />
<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">
coupon_config_id, enterprise_id, wm_mall_store_id, gic_coupon_id, gic_coupon_name, wm_coupon_id, wm_coupon_name, gic_coupon_expire,
status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_wm_store_coupon_config
where coupon_config_id = #{couponConfigId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_wm_store_coupon_config
where coupon_config_id = #{couponConfigId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabWmStoreCouponConfig">
insert into tab_wm_store_coupon_config (coupon_config_id, enterprise_id, wm_mall_store_id,
gic_coupon_id, gic_coupon_name, wm_coupon_id, wm_coupon_name, gic_coupon_expire,
status, create_time, update_time
)
values (#{couponConfigId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{wmMallStoreId,jdbcType=INTEGER},
#{gicCouponId,jdbcType=VARCHAR}, #{gicCouponName,jdbcType=VARCHAR}, #{wmCouponId,jdbcType=VARCHAR},
#{wmCouponName,jdbcType=VARCHAR}, #{gicCouponExpire,jdbcType=TIMESTAMP},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabWmStoreCouponConfig">
insert into tab_wm_store_coupon_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="couponConfigId != null">
coupon_config_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="wmMallStoreId != null">
wm_mall_store_id,
</if>
<if test="gicCouponId != null">
gic_coupon_id,
</if>
<if test="gicCouponName != null">
gic_coupon_name,
</if>
<if test="wmCouponId != null">
wm_coupon_id,
</if>
<if test="wmCouponName != null">
wm_coupon_name,
</if>
<if test="gicCouponExpire != null">
gic_coupon_expire,
</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="couponConfigId != null">
#{couponConfigId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="wmMallStoreId != null">
#{wmMallStoreId,jdbcType=INTEGER},
</if>
<if test="gicCouponId != null">
#{gicCouponId,jdbcType=VARCHAR},
</if>
<if test="gicCouponName != null">
#{gicCouponName,jdbcType=VARCHAR},
</if>
<if test="wmCouponId != null">
#{wmCouponId,jdbcType=VARCHAR},
</if>
<if test="wmCouponName != null">
#{wmCouponName,jdbcType=VARCHAR},
</if>
<if test="gicCouponExpire != null">
#{gicCouponExpire,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>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabWmStoreCouponConfig">
update tab_wm_store_coupon_config
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="wmMallStoreId != null">
wm_mall_store_id = #{wmMallStoreId,jdbcType=INTEGER},
</if>
<if test="gicCouponId != null">
gic_coupon_id = #{gicCouponId,jdbcType=VARCHAR},
</if>
<if test="gicCouponName != null">
gic_coupon_name = #{gicCouponId,jdbcType=VARCHAR},
</if>
<if test="wmCouponId != null">
wm_coupon_id = #{wmCouponId,jdbcType=VARCHAR},
</if>
<if test="wmCouponName != null">
wm_coupon_name = #{wmCouponId,jdbcType=VARCHAR},
</if>
<if test="gicCouponExpire != null">
gic_coupon_expire = #{gicCouponExpire,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>
</set>
where coupon_config_id = #{couponConfigId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabWmStoreCouponConfig">
update tab_wm_store_coupon_config
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
wm_mall_store_id = #{wmMallStoreId,jdbcType=INTEGER},
gic_coupon_id = #{gicCouponId,jdbcType=VARCHAR},
gic_coupon_name = #{gicCouponName,jdbcType=VARCHAR},
wm_coupon_id = #{wmCouponId,jdbcType=VARCHAR},
wm_coupon_name = #{wmCouponName,jdbcType=VARCHAR},
gic_coupon_expire = #{gicCouponExpire,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where coupon_config_id = #{couponConfigId,jdbcType=INTEGER}
</update>
<select id="getCouponConfig" resultMap="BaseResultMap" parameterType="com.gic.enterprise.qo.wm.CouponConfigQO">
select <include refid="Base_Column_List"></include>
from tab_wm_store_coupon_config
where 1 = 1
<if test="wmMallStoreId != null and wmMallStoreId != '' ">
and wm_mall_store_id = #{wmMallStoreId}
</if>
<if test="gicCouponId != null and gicCouponId != '' ">
and gic_coupon_id = #{gicCouponId}
</if>
<if test="startTime != null and startTime != '' ">
and DATE_FORMAT(create_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime != null and endTime != '' ">
and DATE_FORMAT(create_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
<if test="wmCouponId != null and wmCouponId != '' ">
and wm_coupon_id = #{wmCouponId}
</if>
<if test="onlyShowEffective != null and onlyShowEffective == 1">
and (gic_coupon_expire is null or TIMESTAMPDIFF(DAY, now(), gic_coupon_expire) >= 0)
and status = 1
</if>
<if test="couponName != null and couponName != '' ">
and (gic_coupon_name like concat('%', #{couponName}, '%') or wm_coupon_name like concat('%', #{couponName}, '%'))
</if>
<if test="orderByCode != null and orderByCode == 1">
order by create_time
</if>
<if test="orderByCode != null and orderByCode == 2">
order by create_time desc
</if>
</select>
<update id="deleteWmGicCoupon">
update tab_wm_store_coupon_config set status = 0
where gic_coupon_id = #{gicCouponId}
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.TabWmStoreMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabWmStore">
<id column="wm_mall_store_id" jdbcType="INTEGER" property="wmMallStoreId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="wm_main_account" jdbcType="VARCHAR" property="wmMainAccount" />
<result column="wm_pid" jdbcType="VARCHAR" property="wmPid" />
<result column="wm_store_id" jdbcType="VARCHAR" property="wmStoreId" />
<result column="wm_pid_name" jdbcType="VARCHAR" property="wmPidName" />
<result column="member_wechat" jdbcType="VARCHAR" property="memberWechat" />
<result column="wm_appid" jdbcType="VARCHAR" property="wmAppid" />
<result column="mall_mode" jdbcType="INTEGER" property="mallMode" />
<result column="store_brand_id" jdbcType="INTEGER" property="storeBrandId" />
<result column="auth_status" jdbcType="INTEGER" property="authStatus" />
<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">
wm_mall_store_id, enterprise_id, wm_main_account, wm_pid, wm_store_id, wm_pid_name, member_wechat, wm_appid,
mall_mode, store_brand_id, auth_status, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_wm_store
where wm_mall_store_id = #{wmMallStoreId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_wm_store
where wm_mall_store_id = #{wmMallStoreId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabWmStore" useGeneratedKeys="true" keyProperty="wmMallStoreId">
insert into tab_wm_store (wm_mall_store_id, enterprise_id, wm_main_account,
wm_pid, wm_store_id, wm_pid_name, member_wechat, wm_appid,
mall_mode, store_brand_id, auth_status,
status, create_time, update_time
)
values (#{wmMallStoreId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{wmMainAccount,jdbcType=VARCHAR},
#{wmPid,jdbcType=VARCHAR}, #{wmStoreId,jdbcType=VARCHAR}, #{wmPidName,jdbcType=VARCHAR}, #{memberWechat,jdbcType=VARCHAR}, #{wmAppid,jdbcType=VARCHAR},
#{mallMode,jdbcType=INTEGER}, #{storeBrandId,jdbcType=INTEGER}, #{authStatus,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabWmStore" useGeneratedKeys="true" keyProperty="wmMallStoreId">
insert into tab_wm_store
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="wmMallStoreId != null">
wm_mall_store_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="wmMainAccount != null">
wm_main_account,
</if>
<if test="wmPid != null">
wm_pid,
</if>
<if test="wmStoreId != null">
wm_store_id,
</if>
<if test="wmPidName != null">
wm_pid_name,
</if>
<if test="memberWechat != null">
member_wechat,
</if>
<if test="wmAppid != null">
wm_appid,
</if>
<if test="mallMode != null">
mall_mode,
</if>
<if test="storeBrandId != null">
store_brand_id,
</if>
<if test="authStatus != null">
auth_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="wmMallStoreId != null">
#{wmMallStoreId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="wmMainAccount != null">
#{wmMainAccount,jdbcType=VARCHAR},
</if>
<if test="wmPid != null">
#{wmPid,jdbcType=VARCHAR},
</if>
<if test="wmStoreId != null">
#{wmStoreId,jdbcType=VARCHAR},
</if>
<if test="wmPidName != null">
#{wmPidName,jdbcType=VARCHAR},
</if>
<if test="memberWechat != null">
#{memberWechat,jdbcType=VARCHAR},
</if>
<if test="wmAppid != null">
#{wmAppid,jdbcType=VARCHAR},
</if>
<if test="mallMode != null">
#{mallMode,jdbcType=INTEGER},
</if>
<if test="storeBrandId != null">
#{storeBrandId,jdbcType=INTEGER},
</if>
<if test="authStatus != null">
#{authStatus,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.TabWmStore">
update tab_wm_store
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="wmMainAccount != null">
wm_main_account = #{wmMainAccount,jdbcType=VARCHAR},
</if>
<if test="wmPid != null">
wm_pid = #{wmPid,jdbcType=VARCHAR},
</if>
<if test="wmStoreId != null">
wm_store_id = #{wmStoreId,jdbcType=VARCHAR},
</if>
<if test="wmPidName != null">
wm_pid_name = #{wmPidName,jdbcType=VARCHAR},
</if>
<if test="memberWechat != null">
member_wechat = #{memberWechat,jdbcType=VARCHAR},
</if>
<if test="wmAppid != null">
wm_appid = #{wmAppid,jdbcType=VARCHAR},
</if>
<if test="mallMode != null">
mall_mode = #{mallMode,jdbcType=INTEGER},
</if>
<if test="storeBrandId != null">
store_brand_id = #{storeBrandId,jdbcType=INTEGER},
</if>
<if test="authStatus != null">
auth_status = #{authStatus,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 wm_mall_store_id = #{wmMallStoreId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabWmStore">
update tab_wm_store
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
wm_main_account = #{wmMainAccount,jdbcType=VARCHAR},
wm_pid = #{wmPid,jdbcType=VARCHAR},
wm_store_id = #{wmStoreId,jdbcType=VARCHAR},
wm_pid_name = #{wmPidName,jdbcType=VARCHAR},
member_wechat = #{memberWechat,jdbcType=VARCHAR},
wm_appid = #{wmAppid,jdbcType=VARCHAR},
mall_mode = #{mallMode,jdbcType=INTEGER},
store_brand_id = #{storeBrandId,jdbcType=INTEGER},
auth_status = #{authStatus,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where wm_mall_store_id = #{wmMallStoreId,jdbcType=INTEGER}
</update>
<select id="countByParam" resultType="int">
select count(1)
from tab_wm_store
where status = 1
<if test="dataType == 1">
and wm_main_account = #{data}
</if>
<if test="dataType == 2">
and wm_store_id = #{data}
</if>
<if test="dataType == 3">
and wm_pid = #{data}
</if>
<if test="wmMallStoreId != null">
and wm_mall_store_id &lt;&gt; #{wmMallStoreId}
</if>
</select>
<select id="countByStoreName" resultType="int">
select count(1)
from tab_wm_store
where status = 1
<if test="enterpriseId != null">
and enterprise_id = #{enterpriseId}
</if>
and wm_pid_name = #{storeName}
<if test="wmMallStoreId != null">
and wm_mall_store_id &lt;&gt; #{wmMallStoreId}
</if>
</select>
<select id="listWmStore" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
from tab_wm_store
where enterprise_id = #{enterpriseId}
and status = 1
<if test="appId != null and appId != '' ">
and wm_appid = #{appId}
</if>
<if test="authStatus != null">
and auth_status = #{authStatus}
</if>
</select>
<select id="getByWmMainAccount" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
from tab_wm_store
where wm_main_account = #{wmMainAccount}
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.TabWmStoreSyncLogMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabWmStoreSyncLog">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="wm_mall_store_id" jdbcType="INTEGER" property="wmMallStoreId" />
<result column="store_id" jdbcType="INTEGER" property="storeId" />
<result column="store_type" jdbcType="INTEGER" property="storeType" />
<result column="store_name" jdbcType="VARCHAR" property="storeName" />
<result column="store_code" jdbcType="VARCHAR" property="storeCode" />
<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">
id, enterprise_id, wm_mall_store_id, store_id, store_type, store_name, store_code, status,
create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_wm_store_sync_log
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_wm_store_sync_log
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabWmStoreSyncLog">
insert into tab_wm_store_sync_log (id, enterprise_id, wm_mall_store_id,
store_id, store_type, store_name,
store_code, status, create_time,
update_time)
values (#{id,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{wmMallStoreId,jdbcType=INTEGER},
#{storeId,jdbcType=INTEGER}, #{storeType,jdbcType=INTEGER}, #{storeName,jdbcType=VARCHAR},
#{storeCode,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabWmStoreSyncLog">
insert into tab_wm_store_sync_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="wmMallStoreId != null">
wm_mall_store_id,
</if>
<if test="storeId != null">
store_id,
</if>
<if test="storeType != null">
store_type,
</if>
<if test="storeName != null">
store_name,
</if>
<if test="storeCode != null">
store_code,
</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="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="wmMallStoreId != null">
#{wmMallStoreId,jdbcType=INTEGER},
</if>
<if test="storeId != null">
#{storeId,jdbcType=INTEGER},
</if>
<if test="storeType != null">
#{storeType,jdbcType=INTEGER},
</if>
<if test="storeName != null">
#{storeName,jdbcType=VARCHAR},
</if>
<if test="storeCode != null">
#{storeCode,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.TabWmStoreSyncLog">
update tab_wm_store_sync_log
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="wmMallStoreId != null">
wm_mall_store_id = #{wmMallStoreId,jdbcType=INTEGER},
</if>
<if test="storeId != null">
store_id = #{storeId,jdbcType=INTEGER},
</if>
<if test="type != null">
store_type = #{storeType,jdbcType=INTEGER},
</if>
<if test="storeName != null">
store_name = #{storeName,jdbcType=VARCHAR},
</if>
<if test="storeCode != null">
store_code = #{storeCode,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 id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabWmStoreSyncLog">
update tab_wm_store_sync_log
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
wm_mall_store_id = #{wmMallStoreId,jdbcType=INTEGER},
store_id = #{storeId,jdbcType=INTEGER},
store_type = #{storeType,jdbcType=INTEGER},
store_name = #{storeName,jdbcType=VARCHAR},
store_code = #{storeCode,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="pageWmStoreSyncLog" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_wm_store_sync_log
where status = 1
<if test="type != null">
and store_type = #{type}
</if>
and wm_mall_store_id = #{wmMallStoreId}
<if test="search != null and search != '' ">
and (store_name like concat('%', #{search}, '%') or store_code like concat('%', #{search}, '%') )
</if>
</select>
<select id="getStoreList" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_wm_store_sync_log
where status = 1
and wm_mall_store_id = #{wmMallStoreId}
<if test="typeList != null and typeList.size() > 0">
and store_type in
<foreach collection="typeList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
<update id="deleteLogic">
update tab_wm_store_sync_log set status = 0
where status = 1
and wm_mall_store_id = #{wmMallStoreId}
and store_id = #{storeId}
</update>
<select id="listByStoreId" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_wm_store_sync_log
where status = 1
and store_id = #{storeId}
and enterprise_id = #{enterpriseId}
group by wm_mall_store_id
</select>
<select id="listByStoreIdList" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_wm_store_sync_log
where status = 1
and store_id in
<foreach collection="storeIdList" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
and wm_mall_store_id = #{wmMallStoreId}
</select>
</mapper>
\ No newline at end of file
package com.gic.enterprise.service.outer; package com.gic.enterprise.service.outer;
import com.gic.enterprise.service.EnterpriseApiService; import com.gic.cloud.dto.AccountGroupDTO;
import com.gic.enterprise.service.EnterpriseInitService;
import org.junit.Test; import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests; import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
import com.alibaba.fastjson.JSON;
import com.gic.cloud.service.AccountGroupApiService;
/** /**
* @author guojx * @author guojx
* @date 2019/7/16 6:31 PM * @date 2019/7/16 6:31 PM
...@@ -14,9 +16,7 @@ import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests; ...@@ -14,9 +16,7 @@ import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
@ContextConfiguration(locations = {"classpath:applicationContext-conf.xml"}) @ContextConfiguration(locations = {"classpath:applicationContext-conf.xml"})
public class EnterpriseApiServiceImplTest extends AbstractJUnit4SpringContextTests{ public class EnterpriseApiServiceImplTest extends AbstractJUnit4SpringContextTests{
@Autowired @Autowired
private EnterpriseApiService enterpriseApiService; private AccountGroupApiService accountGroupApiService;
@Autowired
private EnterpriseInitService enterpriseInitService;
@Test @Test
public void saveEnterprise() throws Exception { public void saveEnterprise() throws Exception {
...@@ -26,8 +26,9 @@ public class EnterpriseApiServiceImplTest extends AbstractJUnit4SpringContextTes ...@@ -26,8 +26,9 @@ public class EnterpriseApiServiceImplTest extends AbstractJUnit4SpringContextTes
// if (!response.isSuccess()) { // if (!response.isSuccess()) {
// System.out.println(response.getMessage()); // System.out.println(response.getMessage());
// } // }
enterpriseApiService.listEnterprise(null, null, null, " order by a.create_time ", 1, 20); AccountGroupDTO dto = new AccountGroupDTO().setAccountGroupName("guojx").setEnterpriseId(1129);
System.out.println("success");
System.out.println(JSON.toJSONString(accountGroupApiService.saveAccountGroup(dto)));
} }
} }
\ No newline at end of file
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