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 @@
<maven.compiler.target>1.8</maven.compiler.target>
<libraryVersion>4.0-SNAPSHOT</libraryVersion>
<gic-sharding-sdk>3.1-SNAPSHOT</gic-sharding-sdk>
<gic-data-cloud-api>4.0-SNAPSHOT</gic-data-cloud-api>
<!-- api依赖,正式版会在 gic-pom-base 里生成 -->
</properties>
......@@ -115,6 +116,11 @@
<version>${gic-platform-enterprise-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-data-cloud-api</artifactId>
<version>${gic-data-cloud-api}</version>
</dependency>
<dependency>
<groupId>com.gic </groupId>
<artifactId>gic-job-sdk</artifactId>
<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();
}
}
......@@ -30,7 +30,7 @@
<bean class="org.mybatis.spring.SqlSessionFactoryBean" id="sqlSessionFactory">
<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="plugins">
<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.TabAppletDecorationConfigMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabAppletDecorationConfig">
<id column="config_id" jdbcType="INTEGER" property="configId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="member_card_area" jdbcType="VARCHAR" property="memberCardArea" />
<result column="data_asset_area" jdbcType="VARCHAR" property="dataAssetArea" />
<result column="open_card_auth" jdbcType="VARCHAR" property="openCardAuth" />
<result column="gps_decision_card" jdbcType="INTEGER" property="gpsDecisionCard" />
<result column="app_id" jdbcType="VARCHAR" property="appId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
config_id, enterprise_id, member_card_area, data_asset_area, open_card_auth, gps_decision_card,
app_id, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_applet_decoration_config
where config_id = #{configId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_applet_decoration_config
where config_id = #{configId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabAppletDecorationConfig" useGeneratedKeys="true" keyProperty="configId">
insert into tab_applet_decoration_config (config_id, enterprise_id, member_card_area,
data_asset_area, open_card_auth, gps_decision_card,
app_id, create_time, update_time
)
values (#{configId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{memberCardArea,jdbcType=VARCHAR},
#{dataAssetArea,jdbcType=VARCHAR}, #{openCardAuth,jdbcType=VARCHAR}, #{gpsDecisionCard,jdbcType=INTEGER},
#{appId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabAppletDecorationConfig">
insert into tab_applet_decoration_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="configId != null">
config_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="memberCardArea != null">
member_card_area,
</if>
<if test="dataAssetArea != null">
data_asset_area,
</if>
<if test="openCardAuth != null">
open_card_auth,
</if>
<if test="gpsDecisionCard != null">
gps_decision_card,
</if>
<if test="appId != null">
app_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="configId != null">
#{configId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="memberCardArea != null">
#{memberCardArea,jdbcType=VARCHAR},
</if>
<if test="dataAssetArea != null">
#{dataAssetArea,jdbcType=VARCHAR},
</if>
<if test="openCardAuth != null">
#{openCardAuth,jdbcType=VARCHAR},
</if>
<if test="gpsDecisionCard != null">
#{gpsDecisionCard,jdbcType=INTEGER},
</if>
<if test="appId != null">
#{appId,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabAppletDecorationConfig">
update tab_applet_decoration_config
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="memberCardArea != null">
member_card_area = #{memberCardArea,jdbcType=VARCHAR},
</if>
<if test="dataAssetArea != null">
data_asset_area = #{dataAssetArea,jdbcType=VARCHAR},
</if>
<if test="openCardAuth != null">
open_card_auth = #{openCardAuth,jdbcType=VARCHAR},
</if>
<if test="gpsDecisionCard != null">
gps_decision_card = #{gpsDecisionCard,jdbcType=INTEGER},
</if>
<if test="appId != null">
app_id = #{appId,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where config_id = #{configId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabAppletDecorationConfig">
update tab_applet_decoration_config
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
member_card_area = #{memberCardArea,jdbcType=VARCHAR},
data_asset_area = #{dataAssetArea,jdbcType=VARCHAR},
open_card_auth = #{openCardAuth,jdbcType=VARCHAR},
gps_decision_card = #{gpsDecisionCard,jdbcType=INTEGER},
app_id = #{appId,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where config_id = #{configId,jdbcType=INTEGER}
</update>
<select id="getByAppId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"></include>
from tab_applet_decoration_config
where enterprise_id = #{enterpriseId}
and app_id = #{appId}
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.enterprise.dao.mapper.TabAppletPageComponentMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabAppletPageComponent">
<id column="component_id" jdbcType="INTEGER" property="componentId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="page_id" jdbcType="INTEGER" property="pageId" />
<result column="component_type" jdbcType="VARCHAR" property="componentType" />
<result column="component_index" jdbcType="INTEGER" property="componentIndex" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.gic.enterprise.entity.TabAppletPageComponent">
<result column="setting" jdbcType="LONGVARCHAR" property="setting" />
</resultMap>
<sql id="Base_Column_List">
component_id, enterprise_id, page_id, component_type, component_index, status, create_time,
update_time
</sql>
<sql id="Blob_Column_List">
setting
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from tab_applet_page_component
where component_id = #{componentId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_applet_page_component
where component_id = #{componentId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabAppletPageComponent">
insert into tab_applet_page_component (component_id, enterprise_id, page_id,
component_type, component_index, status,
create_time, update_time, setting
)
values (#{componentId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{pageId,jdbcType=INTEGER},
#{componentType,jdbcType=VARCHAR}, #{componentIndex,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{setting,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabAppletPageComponent">
insert into tab_applet_page_component
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="componentId != null">
component_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="pageId != null">
page_id,
</if>
<if test="componentType != null">
component_type,
</if>
<if test="componentIndex != null">
component_index,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="setting != null">
setting,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="componentId != null">
#{componentId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="pageId != null">
#{pageId,jdbcType=INTEGER},
</if>
<if test="componentType != null">
#{componentType,jdbcType=VARCHAR},
</if>
<if test="componentIndex != null">
#{componentIndex,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="setting != null">
#{setting,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabAppletPageComponent">
update tab_applet_page_component
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="pageId != null">
page_id = #{pageId,jdbcType=INTEGER},
</if>
<if test="componentType != null">
component_type = #{componentType,jdbcType=VARCHAR},
</if>
<if test="componentIndex != null">
component_index = #{componentIndex,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="setting != null">
setting = #{setting,jdbcType=LONGVARCHAR},
</if>
</set>
where component_id = #{componentId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.gic.enterprise.entity.TabAppletPageComponent">
update tab_applet_page_component
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
page_id = #{pageId,jdbcType=INTEGER},
component_type = #{componentType,jdbcType=VARCHAR},
component_index = #{componentIndex,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
setting = #{setting,jdbcType=LONGVARCHAR}
where component_id = #{componentId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabAppletPageComponent">
update tab_applet_page_component
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
page_id = #{pageId,jdbcType=INTEGER},
component_type = #{componentType,jdbcType=VARCHAR},
component_index = #{componentIndex,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where component_id = #{componentId,jdbcType=INTEGER}
</update>
<update id="deleteByPageId">
update tab_applet_page_component set status = 0
where status = 1
and page_id = #{pageId}
</update>
<insert id="insertFetch" parameterType="java.util.List">
insert into tab_applet_page_component (component_id, enterprise_id, page_id,
component_type, component_index, status,
create_time, update_time, setting
)
VALUES
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.componentId},
#{item.enterpriseId},
#{item.pageId},
#{item.componentType},
#{item.componentIndex},
#{item.status},
#{item.createTime},
#{item.updateTime},
#{item.setting}
)
</foreach>
</insert>
<select id="listByPageId" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>, <include refid="Blob_Column_List"></include>
from tab_applet_page_component
where status = 1
and page_id = #{pageId}
order by component_index
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.enterprise.dao.mapper.TabAppletQrcodeMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabAppletQrcode">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="path" jdbcType="VARCHAR" property="path" />
<result column="params" jdbcType="VARCHAR" property="params" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="appid" jdbcType="VARCHAR" property="appid" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
<sql id="Base_Column_List">
id, path, params, enterprise_id, appid, create_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_applet_qrcode
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_applet_qrcode
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="com.gic.enterprise.entity.TabAppletQrcode">
insert into tab_applet_qrcode (id, path, params,
enterprise_id, appid, create_time
)
values (#{id,jdbcType=INTEGER}, #{path,jdbcType=VARCHAR}, #{params,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=INTEGER}, #{appid,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="com.gic.enterprise.entity.TabAppletQrcode">
insert into tab_applet_qrcode
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="path != null">
path,
</if>
<if test="params != null">
params,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="appid != null">
appid,
</if>
<if test="createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="path != null">
#{path,jdbcType=VARCHAR},
</if>
<if test="params != null">
#{params,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="appid != null">
#{appid,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabAppletQrcode">
update tab_applet_qrcode
<set>
<if test="path != null">
path = #{path,jdbcType=VARCHAR},
</if>
<if test="params != null">
params = #{params,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="appid != null">
appid = #{appid,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabAppletQrcode">
update tab_applet_qrcode
set path = #{path,jdbcType=VARCHAR},
params = #{params,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
appid = #{appid,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.enterprise.dao.mapper.TabAppletServiceConfigMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabAppletServiceConfig">
<id column="applet_service_id" jdbcType="INTEGER" property="appletServiceId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="app_id" jdbcType="VARCHAR" property="appId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="config_id" jdbcType="BIGINT" property="configId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="status" jdbcType="INTEGER" property="status" />
</resultMap>
<sql id="Base_Column_List">
applet_service_id, enterprise_id, app_id, name, type, config_id, create_time, update_time,
status
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_applet_service_config
where applet_service_id = #{appletServiceId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_applet_service_config
where applet_service_id = #{appletServiceId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabAppletServiceConfig">
insert into tab_applet_service_config (applet_service_id, enterprise_id, app_id,
name, type, config_id,
create_time, update_time, status
)
values (#{appletServiceId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{appId,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{configId,jdbcType=BIGINT},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabAppletServiceConfig">
insert into tab_applet_service_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="appletServiceId != null">
applet_service_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="appId != null">
app_id,
</if>
<if test="name != null">
name,
</if>
<if test="type != null">
type,
</if>
<if test="configId != null">
config_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="status != null">
status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="appletServiceId != null">
#{appletServiceId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="appId != null">
#{appId,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="configId != null">
#{configId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabAppletServiceConfig">
update tab_applet_service_config
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="appId != null">
app_id = #{appId,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="configId != null">
config_id = #{configId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
</set>
where applet_service_id = #{appletServiceId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabAppletServiceConfig">
update tab_applet_service_config
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
app_id = #{appId,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
type = #{type,jdbcType=INTEGER},
config_id = #{configId,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER}
where applet_service_id = #{appletServiceId,jdbcType=INTEGER}
</update>
<insert id="insertList">
insert into tab_applet_service_config (applet_service_id, enterprise_id, app_id,
name, type, create_time,
update_time, status, config_id)
values
<foreach collection="list" index="index" item="item" separator=",">
(
#{item.appletServiceId,jdbcType=INTEGER},
#{item.enterpriseId,jdbcType=INTEGER},
#{item.appId,jdbcType=VARCHAR},
#{item.name,jdbcType=VARCHAR},
#{item.type,jdbcType=INTEGER},
#{item.createTime,jdbcType=TIMESTAMP},
#{item.updateTime,jdbcType=TIMESTAMP},
1,
#{item.configId,jdbcType=BIGINT}
)
</foreach>
-- ON DUPLICATE KEY UPDATE name = VALUES(name)
</insert>
<select id="list" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_applet_service_config
where enterprise_id = #{enterpriseId}
<if test="type != null ">
and type = #{type}
</if>
and status = 1
<if test="search != null and search != '' ">
and name like concat('%', #{search}, '%')
</if>
<if test="null != appIdList and appIdList.size &gt; 0">
and config_id in
<foreach close=")" collection="appIdList" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
</select>
<select id="getAppByAppId" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_applet_service_config
where app_id = #{appId}
and enterprise_id = #{enterpriseId}
and status = 1
</select>
<update id="delByAppIdList">
update tab_applet_service_config set status = 0
where enterprise_id = #{enterpriseId}
<if test="type != null ">
and type = #{type}
</if>
<if test="null != ids and ids.size &gt; 0">
and app_id not in
<foreach close=")" collection="appIdList" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
</update>
<update id="updateTime">
update tab_applet_service_config set update_time = #{updateTime} where app_id = #{appId} and type = #{type}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.enterprise.dao.mapper.TabAppletWechatMenuMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabAppletWechatMenu">
<id column="menu_id" jdbcType="INTEGER" property="menuId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="menu_name" jdbcType="VARCHAR" property="menuName" />
<result column="menu_type" jdbcType="INTEGER" property="menuType" />
<result column="menu_code" jdbcType="VARCHAR" property="menuCode" />
<result column="menu_url" jdbcType="VARCHAR" property="menuUrl" />
<result column="menu_url_para" jdbcType="VARCHAR" property="menuUrlPara" />
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="app_key" jdbcType="VARCHAR" property="appKey" />
<result column="parent_menu_id" jdbcType="CHAR" property="parentMenuId" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
menu_id, enterprise_id, menu_name, menu_type, menu_code, menu_url, menu_url_para,
content, app_key, parent_menu_id, sort, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_applet_wechat_menu
where menu_id = #{menuId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_applet_wechat_menu
where menu_id = #{menuId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabAppletWechatMenu" useGeneratedKeys="true" keyProperty="menuId">
insert into tab_applet_wechat_menu (menu_id, enterprise_id, menu_name,
menu_type, menu_code, menu_url,
menu_url_para, content, app_key,
parent_menu_id, sort, status,
create_time, update_time)
values (#{menuId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{menuName,jdbcType=VARCHAR},
#{menuType,jdbcType=INTEGER}, #{menuCode,jdbcType=VARCHAR}, #{menuUrl,jdbcType=VARCHAR},
#{menuUrlPara,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR},
#{parentMenuId,jdbcType=CHAR}, #{sort,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabAppletWechatMenu">
insert into tab_applet_wechat_menu
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="menuId != null">
menu_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="menuName != null">
menu_name,
</if>
<if test="menuType != null">
menu_type,
</if>
<if test="menuCode != null">
menu_code,
</if>
<if test="menuUrl != null">
menu_url,
</if>
<if test="menuUrlPara != null">
menu_url_para,
</if>
<if test="content != null">
content,
</if>
<if test="appKey != null">
app_key,
</if>
<if test="parentMenuId != null">
parent_menu_id,
</if>
<if test="sort != null">
sort,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="menuId != null">
#{menuId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="menuName != null">
#{menuName,jdbcType=VARCHAR},
</if>
<if test="menuType != null">
#{menuType,jdbcType=INTEGER},
</if>
<if test="menuCode != null">
#{menuCode,jdbcType=VARCHAR},
</if>
<if test="menuUrl != null">
#{menuUrl,jdbcType=VARCHAR},
</if>
<if test="menuUrlPara != null">
#{menuUrlPara,jdbcType=VARCHAR},
</if>
<if test="content != null">
#{content,jdbcType=VARCHAR},
</if>
<if test="appKey != null">
#{appKey,jdbcType=VARCHAR},
</if>
<if test="parentMenuId != null">
#{parentMenuId,jdbcType=CHAR},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabAppletWechatMenu">
update tab_applet_wechat_menu
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="menuName != null">
menu_name = #{menuName,jdbcType=VARCHAR},
</if>
<if test="menuType != null">
menu_type = #{menuType,jdbcType=INTEGER},
</if>
<if test="menuCode != null">
menu_code = #{menuCode,jdbcType=VARCHAR},
</if>
<if test="menuUrl != null">
menu_url = #{menuUrl,jdbcType=VARCHAR},
</if>
<if test="menuUrlPara != null">
menu_url_para = #{menuUrlPara,jdbcType=VARCHAR},
</if>
<if test="content != null">
content = #{content,jdbcType=VARCHAR},
</if>
<if test="appKey != null">
app_key = #{appKey,jdbcType=VARCHAR},
</if>
<if test="parentMenuId != null">
parent_menu_id = #{parentMenuId,jdbcType=CHAR},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where menu_id = #{menuId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabAppletWechatMenu">
update tab_applet_wechat_menu
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
menu_name = #{menuName,jdbcType=VARCHAR},
menu_type = #{menuType,jdbcType=INTEGER},
menu_code = #{menuCode,jdbcType=VARCHAR},
menu_url = #{menuUrl,jdbcType=VARCHAR},
menu_url_para = #{menuUrlPara,jdbcType=VARCHAR},
content = #{content,jdbcType=VARCHAR},
app_key = #{appKey,jdbcType=VARCHAR},
parent_menu_id = #{parentMenuId,jdbcType=CHAR},
sort = #{sort,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where menu_id = #{menuId,jdbcType=INTEGER}
</update>
<select id="listByParentId" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_applet_wechat_menu
where status = 1
and enterprise_id = #{enterpriseId}
and app_key = #{appKey}
and parent_menu_id = #{parentId}
order by sort
</select>
<select id="countByMenuName" resultType="int">
select count(1)
from tab_applet_wechat_menu
where status = 1
and enterprise_id = #{enterpriseId}
and app_key = #{appKey}
and menu_name = #{menuName}
<if test="menuId != null ">
and menu_id &lt;&gt; #{menuId}
</if>
</select>
<select id="listAll" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
from tab_applet_wechat_menu
where status = 1
and enterprise_id = #{enterpriseId}
and app_key = #{appKey}
order by sort
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.enterprise.dao.mapper.TabAuditProcessMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabAuditProcess">
<id column="audit_process_id" jdbcType="INTEGER" property="auditProcessId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="audit_log_id" jdbcType="INTEGER" property="auditLogId" />
<result column="project_item_id" jdbcType="INTEGER" property="projectItemId" />
<result column="is_platform" jdbcType="INTEGER" property="isPlatform" />
<result column="auditor_id" jdbcType="INTEGER" property="auditorId" />
<result column="audit_result" jdbcType="INTEGER" property="auditResult" />
<result column="auditor_type" jdbcType="INTEGER" property="auditorType" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
audit_process_id, enterprise_id, audit_log_id, project_item_id, is_platform, auditor_id,
audit_result, auditor_type, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_audit_process
where audit_process_id = #{auditProcessId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_audit_process
where audit_process_id = #{auditProcessId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabAuditProcess">
insert into tab_audit_process (audit_process_id, enterprise_id, audit_log_id,
project_item_id, is_platform, auditor_id,
audit_result, auditor_type, status,
create_time, update_time)
values (#{auditProcessId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{auditLogId,jdbcType=INTEGER},
#{projectItemId,jdbcType=INTEGER}, #{isPlatform,jdbcType=INTEGER}, #{auditorId,jdbcType=INTEGER},
#{auditResult,jdbcType=INTEGER}, #{auditorType,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabAuditProcess">
insert into tab_audit_process
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="auditProcessId != null">
audit_process_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="auditLogId != null">
audit_log_id,
</if>
<if test="projectItemId != null">
project_item_id,
</if>
<if test="isPlatform != null">
is_platform,
</if>
<if test="auditorId != null">
auditor_id,
</if>
<if test="auditResult != null">
audit_result,
</if>
<if test="auditorType != null">
auditor_type,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="auditProcessId != null">
#{auditProcessId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="auditLogId != null">
#{auditLogId,jdbcType=INTEGER},
</if>
<if test="projectItemId != null">
#{projectItemId,jdbcType=INTEGER},
</if>
<if test="isPlatform != null">
#{isPlatform,jdbcType=INTEGER},
</if>
<if test="auditorId != null">
#{auditorId,jdbcType=INTEGER},
</if>
<if test="auditResult != null">
#{auditResult,jdbcType=INTEGER},
</if>
<if test="auditorType != null">
#{auditorType,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabAuditProcess">
update tab_audit_process
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="auditLogId != null">
audit_log_id = #{auditLogId,jdbcType=INTEGER},
</if>
<if test="projectItemId != null">
project_item_id = #{projectItemId,jdbcType=INTEGER},
</if>
<if test="isPlatform != null">
is_platform = #{isPlatform,jdbcType=INTEGER},
</if>
<if test="auditorId != null">
auditor_id = #{auditorId,jdbcType=INTEGER},
</if>
<if test="auditResult != null">
audit_result = #{auditResult,jdbcType=INTEGER},
</if>
<if test="auditorType != null">
auditor_type = #{auditorType,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where audit_process_id = #{auditProcessId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabAuditProcess">
update tab_audit_process
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
audit_log_id = #{auditLogId,jdbcType=INTEGER},
project_item_id = #{projectItemId,jdbcType=INTEGER},
is_platform = #{isPlatform,jdbcType=INTEGER},
auditor_id = #{auditorId,jdbcType=INTEGER},
audit_result = #{auditResult,jdbcType=INTEGER},
auditor_type = #{auditorType,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where audit_process_id = #{auditProcessId,jdbcType=INTEGER}
</update>
<select id="getOtherTypeProcess" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_audit_process
where enterprise_id = #{enterpriseId}
and audit_log_id = #{auditLogId}
and status = 1
and auditor_type &lt;&gt; #{auditorType}
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.enterprise.dao.mapper.TabBillingAccountMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabBillingAccount">
<id column="account_id" jdbcType="INTEGER" property="accountId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="account_balance" jdbcType="DOUBLE" property="accountBalance" />
<result column="credit_line" jdbcType="INTEGER" property="creditLine" />
<result column="auto_recharge" jdbcType="INTEGER" property="autoRecharge" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
account_id, enterprise_id, account_balance, credit_line, auto_recharge, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_account
where account_id = #{accountId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_billing_account
where account_id = #{accountId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingAccount">
insert into tab_billing_account (account_id, enterprise_id, account_balance,
credit_line, auto_recharge, create_time, update_time)
values (#{accountId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{accountBalance,jdbcType=DOUBLE},
#{creditLine,jdbcType=INTEGER}, #{autoRecharge,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingAccount">
insert into tab_billing_account
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="accountId != null">
account_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="accountBalance != null">
account_balance,
</if>
<if test="creditLine != null">
credit_line,
</if>
<if test="autoRecharge != null">
auto_recharge,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="accountId != null">
#{accountId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="accountBalance != null">
#{accountBalance,jdbcType=DOUBLE},
</if>
<if test="creditLine != null">
#{creditLine,jdbcType=INTEGER},
</if>
<if test="autoRecharge != null">
#{autoRecharge,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingAccount">
update tab_billing_account
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="accountBalance != null">
account_balance = #{accountBalance,jdbcType=DOUBLE},
</if>
<if test="creditLine != null">
credit_line = #{creditLine,jdbcType=INTEGER},
</if>
<if test="autoRecharge != null">
auto_recharge = #{autoRecharge,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where account_id = #{accountId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabBillingAccount">
update tab_billing_account
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
account_balance = #{accountBalance,jdbcType=DOUBLE},
credit_line = #{creditLine,jdbcType=INTEGER},
auto_recharge = #{autoRecharge,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where account_id = #{accountId,jdbcType=INTEGER}
</update>
<select id="selectByEnterpriseId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_account
where enterprise_id = #{enterpriseId}
</select>
<update id="updateAccountAfterRechargeOrRefund">
update tab_billing_account set account_balance = account_balance + #{totalFee} where enterprise_id = #{enterpriseId}
</update>
<update id="deductAccount">
update tab_billing_account set account_balance = account_balance - #{totalFee} where enterprise_id = #{enterpriseId}
</update>
<update id="updateByEnterpriseIdSelective" parameterType="com.gic.enterprise.entity.TabBillingAccount">
update tab_billing_account
<set>
<if test="accountBalance != null">
account_balance = #{accountBalance,jdbcType=DOUBLE},
</if>
<if test="creditLine != null">
credit_line = #{creditLine,jdbcType=INTEGER},
</if>
<if test="autoRecharge != null">
auto_recharge = #{autoRecharge,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</update>
<select id="listBillingAccount" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_billing_account
<if test="enterpriseIdList != null and enterpriseIdList.size() &gt; 0">
where enterprise_id in
<foreach close=")" collection="enterpriseIdList" index="index" item="enterpriseId" open="(" separator=",">
#{enterpriseId}
</foreach>
</if>
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.enterprise.dao.mapper.TabBillingAuditResultMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabBillingAuditResult">
<id column="audit_result_id" jdbcType="INTEGER" property="auditResultId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="serial_number" jdbcType="VARCHAR" property="serialNumber" />
<result column="audit_status" jdbcType="INTEGER" property="auditStatus" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="audit_time" jdbcType="TIMESTAMP" property="auditTime" />
<result column="audit_user_id" jdbcType="INTEGER" property="auditUserId" />
<result column="audit_user_name" jdbcType="VARCHAR" property="auditUserName" />
<result column="audit_user_phone" jdbcType="VARCHAR" property="auditUserPhone" />
<result column="fee_plan" jdbcType="DOUBLE" property="feePlan" />
<result column="fee_paid" jdbcType="DOUBLE" property="feePaid" />
<result column="refuse_reason" jdbcType="VARCHAR" property="refuseReason" />
</resultMap>
<sql id="Base_Column_List">
audit_result_id, enterprise_id, serial_number, audit_status, status, create_time,
update_time, audit_time, audit_user_id, audit_user_name, audit_user_phone, fee_plan,
fee_paid, refuse_reason
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_audit_result
where audit_result_id = #{auditResultId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_billing_audit_result
where audit_result_id = #{auditResultId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingAuditResult">
insert into tab_billing_audit_result (audit_result_id, enterprise_id, serial_number,
audit_status, status, create_time,
update_time, audit_time, audit_user_id,
audit_user_name, audit_user_phone, fee_plan,
fee_paid, refuse_reason)
values (#{auditResultId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{serialNumber,jdbcType=VARCHAR},
#{auditStatus,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{auditTime,jdbcType=TIMESTAMP}, #{auditUserId,jdbcType=INTEGER},
#{auditUserName,jdbcType=VARCHAR}, #{auditUserPhone,jdbcType=VARCHAR}, #{feePlan,jdbcType=DOUBLE},
#{feePaid,jdbcType=DOUBLE}, #{refuseReason,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingAuditResult">
insert into tab_billing_audit_result
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="auditResultId != null">
audit_result_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="serialNumber != null">
serial_number,
</if>
<if test="auditStatus != null">
audit_status,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="auditTime != null">
audit_time,
</if>
<if test="auditUserId != null">
audit_user_id,
</if>
<if test="auditUserName != null">
audit_user_name,
</if>
<if test="auditUserPhone != null">
audit_user_phone,
</if>
<if test="feePlan != null">
fee_plan,
</if>
<if test="feePaid != null">
fee_paid,
</if>
<if test="refuseReason != null">
refuse_reason,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="auditResultId != null">
#{auditResultId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="serialNumber != null">
#{serialNumber,jdbcType=VARCHAR},
</if>
<if test="auditStatus != null">
#{auditStatus,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="auditTime != null">
#{auditTime,jdbcType=TIMESTAMP},
</if>
<if test="auditUserId != null">
#{auditUserId,jdbcType=INTEGER},
</if>
<if test="auditUserName != null">
#{auditUserName,jdbcType=VARCHAR},
</if>
<if test="auditUserPhone != null">
#{auditUserPhone,jdbcType=VARCHAR},
</if>
<if test="feePlan != null">
#{feePlan,jdbcType=DOUBLE},
</if>
<if test="feePaid != null">
#{feePaid,jdbcType=DOUBLE},
</if>
<if test="refuseReason != null">
#{refuseReason,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingAuditResult">
update tab_billing_audit_result
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="serialNumber != null">
serial_number = #{serialNumber,jdbcType=VARCHAR},
</if>
<if test="auditStatus != null">
audit_status = #{auditStatus,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="auditTime != null">
audit_time = #{auditTime,jdbcType=TIMESTAMP},
</if>
<if test="auditUserId != null">
audit_user_id = #{auditUserId,jdbcType=INTEGER},
</if>
<if test="auditUserName != null">
audit_user_name = #{auditUserName,jdbcType=VARCHAR},
</if>
<if test="auditUserPhone != null">
audit_user_phone = #{auditUserPhone,jdbcType=VARCHAR},
</if>
<if test="feePlan != null">
fee_plan = #{feePlan,jdbcType=DOUBLE},
</if>
<if test="feePaid != null">
fee_paid = #{feePaid,jdbcType=DOUBLE},
</if>
<if test="refuseReason != null">
refuse_reason = #{refuseReason,jdbcType=VARCHAR},
</if>
</set>
where audit_result_id = #{auditResultId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabBillingAuditResult">
update tab_billing_audit_result
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
serial_number = #{serialNumber,jdbcType=VARCHAR},
audit_status = #{auditStatus,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
audit_time = #{auditTime,jdbcType=TIMESTAMP},
audit_user_id = #{auditUserId,jdbcType=INTEGER},
audit_user_name = #{auditUserName,jdbcType=VARCHAR},
audit_user_phone = #{auditUserPhone,jdbcType=VARCHAR},
fee_plan = #{feePlan,jdbcType=DOUBLE},
fee_paid = #{feePaid,jdbcType=DOUBLE},
refuse_reason = #{refuseReason,jdbcType=VARCHAR}
where audit_result_id = #{auditResultId,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.enterprise.dao.mapper.TabBillingCouponCardMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabBillingCouponCard">
<id column="coupon_card_id" jdbcType="INTEGER" property="couponCardId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="coupon_card_name" jdbcType="VARCHAR" property="couponCardName" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="effective_start_date" jdbcType="TIMESTAMP" property="effectiveStartDate" />
<result column="effective_end_date" jdbcType="TIMESTAMP" property="effectiveEndDate" />
<result column="content" jdbcType="DOUBLE" property="content" />
<result column="applicable_product_code" jdbcType="VARCHAR" property="applicableProductCode" />
<result column="applicable_product_name" jdbcType="VARCHAR" property="applicableProductName" />
</resultMap>
<sql id="Base_Column_List">
coupon_card_id, enterprise_id, status, create_time, update_time, coupon_card_name,
type, effective_start_date, effective_end_date, content, applicable_product_code,
applicable_product_name
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_coupon_card
where coupon_card_id = #{couponCardId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_billing_coupon_card
where coupon_card_id = #{couponCardId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingCouponCard">
insert into tab_billing_coupon_card (coupon_card_id, enterprise_id, status,
create_time, update_time, coupon_card_name,
type, effective_start_date, effective_end_date,
content, applicable_product_code, applicable_product_name
)
values (#{couponCardId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{couponCardName,jdbcType=VARCHAR},
#{type,jdbcType=INTEGER}, #{effectiveStartDate,jdbcType=TIMESTAMP}, #{effectiveEndDate,jdbcType=TIMESTAMP},
#{content,jdbcType=DOUBLE}, #{applicableProductCode,jdbcType=VARCHAR}, #{applicableProductName,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingCouponCard">
insert into tab_billing_coupon_card
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="couponCardId != null">
coupon_card_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="couponCardName != null">
coupon_card_name,
</if>
<if test="type != null">
type,
</if>
<if test="effectiveStartDate != null">
effective_start_date,
</if>
<if test="effectiveEndDate != null">
effective_end_date,
</if>
<if test="content != null">
content,
</if>
<if test="applicableProductCode != null">
applicable_product_code,
</if>
<if test="applicableProductName != null">
applicable_product_name,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="couponCardId != null">
#{couponCardId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="couponCardName != null">
#{couponCardName,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="effectiveStartDate != null">
#{effectiveStartDate,jdbcType=TIMESTAMP},
</if>
<if test="effectiveEndDate != null">
#{effectiveEndDate,jdbcType=TIMESTAMP},
</if>
<if test="content != null">
#{content,jdbcType=DOUBLE},
</if>
<if test="applicableProductCode != null">
#{applicableProductCode,jdbcType=VARCHAR},
</if>
<if test="applicableProductName != null">
#{applicableProductName,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingCouponCard">
update tab_billing_coupon_card
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="couponCardName != null">
coupon_card_name = #{couponCardName,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="effectiveStartDate != null">
effective_start_date = #{effectiveStartDate,jdbcType=TIMESTAMP},
</if>
<if test="effectiveEndDate != null">
effective_end_date = #{effectiveEndDate,jdbcType=TIMESTAMP},
</if>
<if test="content != null">
content = #{content,jdbcType=DOUBLE},
</if>
<if test="applicableProductCode != null">
applicable_product_code = #{applicableProductCode,jdbcType=VARCHAR},
</if>
<if test="applicableProductName != null">
applicable_product_name = #{applicableProductName,jdbcType=VARCHAR},
</if>
</set>
where coupon_card_id = #{couponCardId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabBillingCouponCard">
update tab_billing_coupon_card
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
coupon_card_name = #{couponCardName,jdbcType=VARCHAR},
type = #{type,jdbcType=INTEGER},
effective_start_date = #{effectiveStartDate,jdbcType=TIMESTAMP},
effective_end_date = #{effectiveEndDate,jdbcType=TIMESTAMP},
content = #{content,jdbcType=DOUBLE},
applicable_product_code = #{applicableProductCode,jdbcType=VARCHAR},
applicable_product_name = #{applicableProductName,jdbcType=VARCHAR}
where coupon_card_id = #{couponCardId,jdbcType=INTEGER}
</update>
<select id="listBillingCouponCard" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_coupon_card
where status != 0
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="startTime != null ">
and effective_end_date &gt;= #{startTime}
</if>
<if test="endTime != null ">
and effective_end_date &lt;= #{endTime}
</if>
</select>
<select id="countCoupon" resultType="integer">
select count(1) from
tab_billing_coupon_card
where status = 1
and effective_end_date >= now()
and enterprise_id = #{enterpriseId}
</select>
<select id="listCoupCardEnabled" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_coupon_card
where status = 1
and effective_end_date &gt;= now()
and effective_start_date &lt;= now()
<if test="enterpriseId != null ">
and enterprise_id = #{enterpriseId}
</if>
<if test="code != null ">
and applicable_product_code like concat('%_',#{code},'_%')
</if>
</select>
<update id="expireCoupCard">
update tab_billing_coupon_card
set status = 3
where status=1 and effective_end_date &lt;= now()
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.enterprise.dao.mapper.TabBillingRefundMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabBillingRefund">
<id column="refund_id" jdbcType="INTEGER" property="refundId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="refund_pay_number" jdbcType="VARCHAR" property="refundPayNumber" />
<result column="refund_serial_number" jdbcType="VARCHAR" property="refundSerialNumber" />
<result column="order_serial_number" jdbcType="VARCHAR" property="orderSerialNumber" />
<result column="order_fee" jdbcType="DOUBLE" property="orderFee" />
<result column="refund_fee" jdbcType="DOUBLE" property="refundFee" />
<result column="refund_status" jdbcType="INTEGER" property="refundStatus" />
<result column="request_code" jdbcType="VARCHAR" property="requestCode" />
<result column="refund_channel" jdbcType="INTEGER" property="refundChannel" />
<result column="time_end" jdbcType="TIMESTAMP" property="timeEnd" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="refund_reason" jdbcType="VARCHAR" property="refundReason" />
</resultMap>
<sql id="Base_Column_List">
refund_id, enterprise_id, refund_pay_number, refund_serial_number, order_serial_number,
order_fee, refund_fee, refund_status, request_code, refund_channel, time_end, status,
create_time, update_time, refund_reason
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_refund
where refund_id = #{refundId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_billing_refund
where refund_id = #{refundId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingRefund">
insert into tab_billing_refund (refund_id, enterprise_id, refund_pay_number,
refund_serial_number, order_serial_number,
order_fee, refund_fee, refund_status,
request_code, refund_channel, time_end,
status, create_time, update_time,
refund_reason)
values (#{refundId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{refundPayNumber,jdbcType=VARCHAR},
#{refundSerialNumber,jdbcType=VARCHAR}, #{orderSerialNumber,jdbcType=VARCHAR},
#{orderFee,jdbcType=DOUBLE}, #{refundFee,jdbcType=DOUBLE}, #{refundStatus,jdbcType=INTEGER},
#{requestCode,jdbcType=VARCHAR}, #{refundChannel,jdbcType=INTEGER}, #{timeEnd,jdbcType=TIMESTAMP},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{refundReason,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingRefund">
insert into tab_billing_refund
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="refundId != null">
refund_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="refundPayNumber != null">
refund_pay_number,
</if>
<if test="refundSerialNumber != null">
refund_serial_number,
</if>
<if test="orderSerialNumber != null">
order_serial_number,
</if>
<if test="orderFee != null">
order_fee,
</if>
<if test="refundFee != null">
refund_fee,
</if>
<if test="refundStatus != null">
refund_status,
</if>
<if test="requestCode != null">
request_code,
</if>
<if test="refundChannel != null">
refund_channel,
</if>
<if test="timeEnd != null">
time_end,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="refundReason != null">
refund_reason,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="refundId != null">
#{refundId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="refundPayNumber != null">
#{refundPayNumber,jdbcType=VARCHAR},
</if>
<if test="refundSerialNumber != null">
#{refundSerialNumber,jdbcType=VARCHAR},
</if>
<if test="orderSerialNumber != null">
#{orderSerialNumber,jdbcType=VARCHAR},
</if>
<if test="orderFee != null">
#{orderFee,jdbcType=DOUBLE},
</if>
<if test="refundFee != null">
#{refundFee,jdbcType=DOUBLE},
</if>
<if test="refundStatus != null">
#{refundStatus,jdbcType=INTEGER},
</if>
<if test="requestCode != null">
#{requestCode,jdbcType=VARCHAR},
</if>
<if test="refundChannel != null">
#{refundChannel,jdbcType=INTEGER},
</if>
<if test="timeEnd != null">
#{timeEnd,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="refundReason != null">
#{refundReason,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabBillingRefund">
update tab_billing_refund
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="refundPayNumber != null">
refund_pay_number = #{refundPayNumber,jdbcType=VARCHAR},
</if>
<if test="refundSerialNumber != null">
refund_serial_number = #{refundSerialNumber,jdbcType=VARCHAR},
</if>
<if test="orderSerialNumber != null">
order_serial_number = #{orderSerialNumber,jdbcType=VARCHAR},
</if>
<if test="orderFee != null">
order_fee = #{orderFee,jdbcType=DOUBLE},
</if>
<if test="refundFee != null">
refund_fee = #{refundFee,jdbcType=DOUBLE},
</if>
<if test="refundStatus != null">
refund_status = #{refundStatus,jdbcType=INTEGER},
</if>
<if test="requestCode != null">
request_code = #{requestCode,jdbcType=VARCHAR},
</if>
<if test="refundChannel != null">
refund_channel = #{refundChannel,jdbcType=INTEGER},
</if>
<if test="timeEnd != null">
time_end = #{timeEnd,jdbcType=TIMESTAMP},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="refundReason != null">
refund_reason = #{refundReason,jdbcType=VARCHAR},
</if>
</set>
where refund_id = #{refundId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabBillingRefund">
update tab_billing_refund
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
refund_pay_number = #{refundPayNumber,jdbcType=VARCHAR},
refund_serial_number = #{refundSerialNumber,jdbcType=VARCHAR},
order_serial_number = #{orderSerialNumber,jdbcType=VARCHAR},
order_fee = #{orderFee,jdbcType=DOUBLE},
refund_fee = #{refundFee,jdbcType=DOUBLE},
refund_status = #{refundStatus,jdbcType=INTEGER},
request_code = #{requestCode,jdbcType=VARCHAR},
refund_channel = #{refundChannel,jdbcType=INTEGER},
time_end = #{timeEnd,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
refund_reason = #{refundReason,jdbcType=VARCHAR}
where refund_id = #{refundId,jdbcType=INTEGER}
</update>
<select id="getRefund" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_refund
where status = 1
and enterprise_id = #{enterpriseId}
and refund_serial_number = #{refundSerialNumber}
and request_code = #{requestCode}
</select>
<select id="getTotalRefundFee" resultType="java.lang.Double">
select
sum(refund_fee)
from tab_billing_refund
where enterprise_id = #{enterpriseId}
and order_serial_number = #{orderSerialNumber}
and request_code = #{requestCode}
and status = 1
</select>
<select id="listRefund" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_billing_refund
where enterprise_id = #{enterpriseId}
<if test="search != null and search != '' ">
and refund_seial_number like concat('%', #{search}, '%')
</if>
<if test="startTime != null ">
and time_end &gt; #{startTime}
</if>
<if test="endTime != null ">
and time_end &lt; #{endTime}
</if>
and status = 1
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.enterprise.dao.mapper.TabConfigRuleEnterpriseMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabConfigRuleEnterprise">
<id column="enterprise_rule_id" jdbcType="INTEGER" property="enterpriseRuleId" />
<result column="rule_name" jdbcType="VARCHAR" property="ruleName" />
<result column="enterprise_type" jdbcType="INTEGER" property="enterpriseType" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
enterprise_rule_id, rule_name, enterprise_type, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_config_rule_enterprise
where enterprise_rule_id = #{enterpriseRuleId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_config_rule_enterprise
where enterprise_rule_id = #{enterpriseRuleId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabConfigRuleEnterprise" useGeneratedKeys="true" keyProperty="enterpriseRuleId">
insert into tab_config_rule_enterprise (enterprise_rule_id, rule_name, enterprise_type,
status, create_time, update_time
)
values (#{enterpriseRuleId,jdbcType=INTEGER}, #{ruleName,jdbcType=VARCHAR}, #{enterpriseType,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabConfigRuleEnterprise">
insert into tab_config_rule_enterprise
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseRuleId != null">
enterprise_rule_id,
</if>
<if test="ruleName != null">
rule_name,
</if>
<if test="enterpriseType != null">
enterprise_type,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseRuleId != null">
#{enterpriseRuleId,jdbcType=INTEGER},
</if>
<if test="ruleName != null">
#{ruleName,jdbcType=VARCHAR},
</if>
<if test="enterpriseType != null">
#{enterpriseType,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabConfigRuleEnterprise">
update tab_config_rule_enterprise
<set>
<if test="ruleName != null">
rule_name = #{ruleName,jdbcType=VARCHAR},
</if>
<if test="enterpriseType != null">
enterprise_type = #{enterpriseType,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where enterprise_rule_id = #{enterpriseRuleId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabConfigRuleEnterprise">
update tab_config_rule_enterprise
set rule_name = #{ruleName,jdbcType=VARCHAR},
enterprise_type = #{enterpriseType,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where enterprise_rule_id = #{enterpriseRuleId,jdbcType=INTEGER}
</update>
<select id="countRepeatName" resultType="int">
select count(1) from tab_config_rule_enterprise
where status = 1
and rule_name = #{ruleName}
<if test="enterpriseRuleId != null">
and enterprise_rule_id &lt;&gt; #{enterpriseRuleId}
</if>
</select>
<select id="listRule" resultType="com.gic.enterprise.dto.rule.RuleEnterpriseDTO">
select t1.enterprise_rule_id enterpriseRuleId, t1.rule_name ruleName, count(DISTINCT t2.enterprise_id) countEnterpriseId
from tab_config_rule_enterprise t1
left join tab_config_rule_enterprise_rel t2 on t1.enterprise_rule_id = t2.enterprise_rule_id
and t2.status = 1
<if test="search == null or search == '' ">
and t2.enterprise_id != -1
</if>
<if test="search != null and search != '' ">
left join tab_enterprise t3 on t2.enterprise_id = t3.enterprise_id
</if>
where t1.status = 1
<if test="search != null and search != '' ">
and ( t1.rule_name like concat('%', #{search}, '%')
or t3.enterprise_name like concat('%', #{search}, '%')
or t3.company_name like concat('%', #{search}, '%') )
</if>
GROUP BY t1.enterprise_rule_id
order by t1.create_time desc
</select>
<select id="listEnterpriseRule" resultType="com.gic.enterprise.dto.rule.RuleEnterpriseDTO">
select t2.enterprise_name enterpriseName, t2.company_name companyName, t2.logo logo, t2.enterprise_id enterpriseId
from tab_config_rule_enterprise_rel t1
left join tab_enterprise t2 on t1.enterprise_id = t2.enterprise_id
where t1.status = 1
and t2.status = 1
and t1.enterprise_id != -1
and t1.enterprise_rule_id = #{enterpriseRuleId}
<if test="search != null and search != '' ">
and ( t2.enterprise_name like concat('%', #{search}, '%')
or t2.company_name like concat('%', #{search}, '%') )
</if>
order by t1.create_time desc
</select>
<select id="listEnterpriseRuleAll" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_config_rule_enterprise
where status = 1
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.enterprise.dao.mapper.TabConfigRuleEnterpriseRelMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabConfigRuleEnterpriseRel">
<id column="enterprise_rel_id" jdbcType="INTEGER" property="enterpriseRelId" />
<result column="enterprise_rule_id" jdbcType="INTEGER" property="enterpriseRuleId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
enterprise_rel_id, enterprise_rule_id, enterprise_id, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_config_rule_enterprise_rel
where enterprise_rel_id = #{enterpriseRelId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_config_rule_enterprise_rel
where enterprise_rel_id = #{enterpriseRelId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabConfigRuleEnterpriseRel">
insert into tab_config_rule_enterprise_rel (enterprise_rel_id, enterprise_rule_id,
enterprise_id, status, create_time,
update_time)
values (#{enterpriseRelId,jdbcType=INTEGER}, #{enterpriseRuleId,jdbcType=INTEGER},
#{enterpriseId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabConfigRuleEnterpriseRel">
insert into tab_config_rule_enterprise_rel
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="enterpriseRelId != null">
enterprise_rel_id,
</if>
<if test="enterpriseRuleId != null">
enterprise_rule_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="enterpriseRelId != null">
#{enterpriseRelId,jdbcType=INTEGER},
</if>
<if test="enterpriseRuleId != null">
#{enterpriseRuleId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabConfigRuleEnterpriseRel">
update tab_config_rule_enterprise_rel
<set>
<if test="enterpriseRuleId != null">
enterprise_rule_id = #{enterpriseRuleId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where enterprise_rel_id = #{enterpriseRelId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabConfigRuleEnterpriseRel">
update tab_config_rule_enterprise_rel
set enterprise_rule_id = #{enterpriseRuleId,jdbcType=INTEGER},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where enterprise_rel_id = #{enterpriseRelId,jdbcType=INTEGER}
</update>
<insert id="insertBatch" parameterType="java.util.List">
insert into tab_config_rule_enterprise_rel (enterprise_rel_id, enterprise_rule_id,
enterprise_id, status, create_time,
update_time)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.enterpriseRelId},
#{item.enterpriseRuleId},
#{item.enterpriseId},
#{item.status},
#{item.createTime},
#{item.updateTime}
)
</foreach>
</insert>
<update id="deleteByEnterpriseRuleId">
update tab_config_rule_enterprise_rel set status = 0
where status = 1
and enterprise_rule_id = #{enterpriseRuleId}
</update>
<update id="deleteByEnterpriseIdList">
update tab_config_rule_enterprise_rel set status = 0
where status = 1
<if test="list != null and list.size() > 0">
and enterprise_id in
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</update>
<select id="listEnterprise" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_config_rule_enterprise_rel
where status = 1
group by enterprise_id
</select>
<select id="getByEnterpriseId" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_config_rule_enterprise_rel
where status = 1
and enterprise_id = #{enterpriseId}
limit 1
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.enterprise.dao.mapper.TabConfigRuleRelMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabConfigRuleRel">
<id column="rule_rel_id" jdbcType="INTEGER" property="ruleRelId" />
<result column="enterprise_rule_id" jdbcType="INTEGER" property="enterpriseRuleId" />
<result column="rule_id" jdbcType="INTEGER" property="ruleId" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
rule_rel_id, enterprise_rule_id, rule_id, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_config_rule_rel
where rule_rel_id = #{ruleRelId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_config_rule_rel
where rule_rel_id = #{ruleRelId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabConfigRuleRel">
insert into tab_config_rule_rel (rule_rel_id, enterprise_rule_id, rule_id,
status, create_time, update_time
)
values (#{ruleRelId,jdbcType=INTEGER}, #{enterpriseRuleId,jdbcType=INTEGER}, #{ruleId,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabConfigRuleRel">
insert into tab_config_rule_rel
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="ruleRelId != null">
rule_rel_id,
</if>
<if test="enterpriseRuleId != null">
enterprise_rule_id,
</if>
<if test="ruleId != null">
rule_id,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="ruleRelId != null">
#{ruleRelId,jdbcType=INTEGER},
</if>
<if test="enterpriseRuleId != null">
#{enterpriseRuleId,jdbcType=INTEGER},
</if>
<if test="ruleId != null">
#{ruleId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabConfigRuleRel">
update tab_config_rule_rel
<set>
<if test="enterpriseRuleId != null">
enterprise_rule_id = #{enterpriseRuleId,jdbcType=INTEGER},
</if>
<if test="ruleId != null">
rule_id = #{ruleId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where rule_rel_id = #{ruleRelId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabConfigRuleRel">
update tab_config_rule_rel
set enterprise_rule_id = #{enterpriseRuleId,jdbcType=INTEGER},
rule_id = #{ruleId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where rule_rel_id = #{ruleRelId,jdbcType=INTEGER}
</update>
<insert id="insertBatch" parameterType="java.util.List">
insert into tab_config_rule_rel (rule_rel_id, enterprise_rule_id,
rule_id, status, create_time,
update_time)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.ruleRelId},
#{item.enterpriseRuleId},
#{item.ruleId},
#{item.status},
#{item.createTime},
#{item.updateTime}
)
</foreach>
</insert>
<update id="deleteByEnterpriseRuleId">
update tab_config_rule_rel set status = 0
where status = 1
and enterprise_rule_id = #{enterpriseRuleId}
</update>
<select id="listRuleRel" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_config_rule_rel
where status = 1
and enterprise_rule_id = #{enterpriseRuleId}
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.enterprise.dao.mapper.TabCustomGuideMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabCustomGuide">
<id column="guide_id" jdbcType="INTEGER" property="guideId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="icon" jdbcType="VARCHAR" property="icon" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="entry_condition" jdbcType="INTEGER" property="entryCondition" />
<result column="link" jdbcType="VARCHAR" property="link" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="version" jdbcType="INTEGER" property="version" />
<result column="icon_path" jdbcType="VARCHAR" property="iconPath" />
<result column="selected_icon_path" jdbcType="VARCHAR" property="selectedIconPath" />
<result column="custom_link_type" jdbcType="INTEGER" property="customLinkType" />
<result column="custom_page" jdbcType="VARCHAR" property="customPage" />
<result column="appid" jdbcType="VARCHAR" property="appid" />
</resultMap>
<sql id="Base_Column_List">
guide_id, enterprise_id, icon, title, entry_condition, link, status, sort, create_time,
update_time, version, icon_path, selected_icon_path, custom_link_type, custom_page,
appid
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_custom_guide
where guide_id = #{guideId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_custom_guide
where guide_id = #{guideId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabCustomGuide">
insert into tab_custom_guide (guide_id, enterprise_id, icon,
title, entry_condition, link,
status, sort, create_time,
update_time, version, icon_path,
selected_icon_path, custom_link_type, custom_page,
appid)
values (#{guideId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{icon,jdbcType=VARCHAR},
#{title,jdbcType=VARCHAR}, #{entryCondition,jdbcType=INTEGER}, #{link,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{version,jdbcType=INTEGER}, #{iconPath,jdbcType=VARCHAR},
#{selectedIconPath,jdbcType=VARCHAR}, #{customLinkType,jdbcType=INTEGER}, #{customPage,jdbcType=VARCHAR},
#{appid,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabCustomGuide">
insert into tab_custom_guide
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="guideId != null">
guide_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="icon != null">
icon,
</if>
<if test="title != null">
title,
</if>
<if test="entryCondition != null">
entry_condition,
</if>
<if test="link != null">
link,
</if>
<if test="status != null">
status,
</if>
<if test="sort != null">
sort,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="version != null">
version,
</if>
<if test="iconPath != null">
icon_path,
</if>
<if test="selectedIconPath != null">
selected_icon_path,
</if>
<if test="customLinkType != null">
custom_link_type,
</if>
<if test="customPage != null">
custom_page,
</if>
<if test="appid != null">
appid,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="guideId != null">
#{guideId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="icon != null">
#{icon,jdbcType=VARCHAR},
</if>
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="entryCondition != null">
#{entryCondition,jdbcType=INTEGER},
</if>
<if test="link != null">
#{link,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="version != null">
#{version,jdbcType=INTEGER},
</if>
<if test="iconPath != null">
#{iconPath,jdbcType=VARCHAR},
</if>
<if test="selectedIconPath != null">
#{selectedIconPath,jdbcType=VARCHAR},
</if>
<if test="customLinkType != null">
#{customLinkType,jdbcType=INTEGER},
</if>
<if test="customPage != null">
#{customPage,jdbcType=VARCHAR},
</if>
<if test="appid != null">
#{appid,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabCustomGuide">
update tab_custom_guide
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="icon != null">
icon = #{icon,jdbcType=VARCHAR},
</if>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="entryCondition != null">
entry_condition = #{entryCondition,jdbcType=INTEGER},
</if>
<if test="link != null">
link = #{link,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="version != null">
version = #{version,jdbcType=INTEGER},
</if>
<if test="iconPath != null">
icon_path = #{iconPath,jdbcType=VARCHAR},
</if>
<if test="selectedIconPath != null">
selected_icon_path = #{selectedIconPath,jdbcType=VARCHAR},
</if>
<if test="customLinkType != null">
custom_link_type = #{customLinkType,jdbcType=INTEGER},
</if>
<if test="customPage != null">
custom_page = #{customPage,jdbcType=VARCHAR},
</if>
<if test="appid != null">
appid = #{appid,jdbcType=VARCHAR},
</if>
</set>
where guide_id = #{guideId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabCustomGuide">
update tab_custom_guide
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
icon = #{icon,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR},
entry_condition = #{entryCondition,jdbcType=INTEGER},
link = #{link,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
sort = #{sort,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
version = #{version,jdbcType=INTEGER},
icon_path = #{iconPath,jdbcType=VARCHAR},
selected_icon_path = #{selectedIconPath,jdbcType=VARCHAR},
custom_link_type = #{customLinkType,jdbcType=INTEGER},
custom_page = #{customPage,jdbcType=VARCHAR},
appid = #{appid,jdbcType=VARCHAR}
where guide_id = #{guideId,jdbcType=INTEGER}
</update>
<select id="getVersion" resultType="integer">
select
version
from tab_custom_guide
where 1=1
<if test="enterpriseId != null">
and enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</if>
and appid=#{appid}
order by version desc
</select>
<select id="listGuide" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_custom_guide
where 1=1
<if test="enterpriseId != null">
and enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</if>
<if test="version != null">
and version = #{version}
</if>
and (status = 1 or status = 2)
<if test="appid != null and appid != ''">
and appid = #{appid}
</if>
order by sort
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.enterprise.dao.mapper.TabCustomStoreMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabCustomStore">
<id column="custom_store_id" jdbcType="INTEGER" property="customStoreId" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="appid" jdbcType="VARCHAR" property="appid" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="store_widget_id" jdbcType="INTEGER" property="storeWidgetId" />
<result column="app_type" jdbcType="INTEGER" property="appType" />
</resultMap>
<sql id="Base_Column_List">
custom_store_id, title, enterprise_id, appid, status, create_time, update_time, store_widget_id,
app_type
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_custom_store
where custom_store_id = #{customStoreId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_custom_store
where custom_store_id = #{customStoreId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabCustomStore">
insert into tab_custom_store (custom_store_id, title, enterprise_id,
appid, status, create_time,
update_time, store_widget_id, app_type
)
values (#{customStoreId,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{enterpriseId,jdbcType=INTEGER},
#{appid,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{storeWidgetId,jdbcType=INTEGER}, #{appType,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabCustomStore">
insert into tab_custom_store
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="customStoreId != null">
custom_store_id,
</if>
<if test="title != null">
title,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="appid != null">
appid,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="storeWidgetId != null">
store_widget_id,
</if>
<if test="appType != null">
app_type,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="customStoreId != null">
#{customStoreId,jdbcType=INTEGER},
</if>
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="appid != null">
#{appid,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="storeWidgetId != null">
#{storeWidgetId,jdbcType=INTEGER},
</if>
<if test="appType != null">
#{appType,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabCustomStore">
update tab_custom_store
<set>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="appid != null">
appid = #{appid,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="storeWidgetId != null">
store_widget_id = #{storeWidgetId,jdbcType=INTEGER},
</if>
<if test="appType != null">
app_type = #{appType,jdbcType=INTEGER},
</if>
</set>
where custom_store_id = #{customStoreId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabCustomStore">
update tab_custom_store
set title = #{title,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
appid = #{appid,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
store_widget_id = #{storeWidgetId,jdbcType=INTEGER},
app_type = #{appType,jdbcType=INTEGER}
where custom_store_id = #{customStoreId,jdbcType=INTEGER}
</update>
<select id="pageCustomStore" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_custom_store
where enterprise_id = #{enterpriseId,jdbcType=INTEGER} and (status=1 or status=2)
<if test="appid != null and appid != ''">
and appid= #{appid}
</if>
<if test="search != null and search != ''">
and title like concat('%', #{search}, '%')
</if>
</select>
<update id="closeCustomStore" >
update tab_custom_store
set status = 2
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
and appid = #{appid,jdbcType=VARCHAR} and status=1
</update>
<select id="getCustomStore" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_custom_store
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
and appid= #{appid}
and status=1
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.enterprise.dao.mapper.TabCustomThemeMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabCustomTheme">
<id column="theme_id" jdbcType="INTEGER" property="themeId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="theme" jdbcType="INTEGER" property="theme" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="app_type" jdbcType="INTEGER" property="appType" />
<result column="appid" jdbcType="VARCHAR" property="appid" />
</resultMap>
<sql id="Base_Column_List">
theme_id, enterprise_id, theme, create_time, update_time, app_type, appid
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_custom_theme
where theme_id = #{themeId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_custom_theme
where theme_id = #{themeId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabCustomTheme">
insert into tab_custom_theme (theme_id, enterprise_id, theme,
create_time, update_time, app_type,
appid)
values (#{themeId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{theme,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{appType,jdbcType=INTEGER},
#{appid,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabCustomTheme">
insert into tab_custom_theme
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="themeId != null">
theme_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="theme != null">
theme,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="appType != null">
app_type,
</if>
<if test="appid != null">
appid,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="themeId != null">
#{themeId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="theme != null">
#{theme,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="appType != null">
#{appType,jdbcType=INTEGER},
</if>
<if test="appid != null">
#{appid,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabCustomTheme">
update tab_custom_theme
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="theme != null">
theme = #{theme,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="appType != null">
app_type = #{appType,jdbcType=INTEGER},
</if>
<if test="appid != null">
appid = #{appid,jdbcType=VARCHAR},
</if>
</set>
where theme_id = #{themeId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabCustomTheme">
update tab_custom_theme
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
theme = #{theme,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
app_type = #{appType,jdbcType=INTEGER},
appid = #{appid,jdbcType=VARCHAR}
where theme_id = #{themeId,jdbcType=INTEGER}
</update>
<select id="listTheme" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_custom_theme
where 1=1
<if test="enterpriseId != null">
and enterprise_id = #{enterpriseId,jdbcType=INTEGER}
</if>
and appid= #{appid}
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.enterprise.dao.mapper.TabCustomUdeskFieldMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabCustomUdeskField">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="udesk_field_id" jdbcType="VARCHAR" property="udeskFieldId" />
<result column="gic_field_id" jdbcType="VARCHAR" property="gicFieldId" />
<result column="gic_field_name" jdbcType="VARCHAR" property="gicFieldName" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
id, udesk_field_id, gic_field_id, gic_field_name, status, enterprise_id, create_time,
update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_custom_udesk_field
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_custom_udesk_field
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabCustomUdeskField">
insert into tab_custom_udesk_field (id, udesk_field_id, gic_field_id,
gic_field_name, status, enterprise_id,
create_time, update_time)
values (#{id,jdbcType=INTEGER}, #{udeskFieldId,jdbcType=VARCHAR}, #{gicFieldId,jdbcType=VARCHAR},
#{gicFieldName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabCustomUdeskField">
insert into tab_custom_udesk_field
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="udeskFieldId != null">
udesk_field_id,
</if>
<if test="gicFieldId != null">
gic_field_id,
</if>
<if test="gicFieldName != null">
gic_field_name,
</if>
<if test="status != null">
status,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="udeskFieldId != null">
#{udeskFieldId,jdbcType=VARCHAR},
</if>
<if test="gicFieldId != null">
#{gicFieldId,jdbcType=VARCHAR},
</if>
<if test="gicFieldName != null">
#{gicFieldName,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabCustomUdeskField">
update tab_custom_udesk_field
<set>
<if test="udeskFieldId != null">
udesk_field_id = #{udeskFieldId,jdbcType=VARCHAR},
</if>
<if test="gicFieldId != null">
gic_field_id = #{gicFieldId,jdbcType=VARCHAR},
</if>
<if test="gicFieldName != null">
gic_field_name = #{gicFieldName,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabCustomUdeskField">
update tab_custom_udesk_field
set udesk_field_id = #{udeskFieldId,jdbcType=VARCHAR},
gic_field_id = #{gicFieldId,jdbcType=VARCHAR},
gic_field_name = #{gicFieldName,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="listEnterpriseField" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_custom_udesk_field
where enterprise_id = #{enterpriseId,jdbcType=INTEGER} and (status=1 or status=2)
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.enterprise.dao.mapper.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
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