first commit
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
Spring Boot Version: ${spring-boot.version}
|
||||
Spring Application Name: ${spring.application.name}
|
||||
_ _
|
||||
(_) | |
|
||||
_ __ _ _ ___ _ _ _ ______ ___ _ _ ___ | |_ ___ _ __ ___
|
||||
| '__|| | | | / _ \ | | | || ||______|/ __|| | | |/ __|| __| / _ \| '_ ` _ \
|
||||
| | | |_| || (_) || |_| || | \__ \| |_| |\__ \| |_ | __/| | | | | |
|
||||
|_| \__,_| \___/ \__, ||_| |___/ \__, ||___/ \__| \___||_| |_| |_|
|
||||
__/ | __/ |
|
||||
|___/ |___/
|
||||
@@ -0,0 +1,25 @@
|
||||
# Tomcat
|
||||
server:
|
||||
port: 9201
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
application:
|
||||
# 应用名称
|
||||
name: mhd-system
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: dev
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 127.0.0.1:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
shared-configs:
|
||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="logs/mhd-system" />
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com.mhd" level="info" />
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn" />
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info" />
|
||||
<appender-ref ref="file_error" />
|
||||
</root>
|
||||
</configuration>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?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.mhd.basic.domain.contractManageDetail.repository.mapper.ContractManageDetailMapper">
|
||||
|
||||
|
||||
|
||||
<sql id="selectContractManageDetailPo">
|
||||
select
|
||||
*
|
||||
from contract_manage_detail
|
||||
</sql>
|
||||
|
||||
<sql id="selectContractManageDetailPo1">
|
||||
<where>
|
||||
<if test="contractManageId != null ">
|
||||
and contract_manage_id = #{contractManageId}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="subjectType != null ">
|
||||
and subject_type = #{subjectType}
|
||||
</if>
|
||||
<if test="subjectName != null and subjectName != ''">
|
||||
and subject_name like concat('%', #{subjectName}, '%')
|
||||
</if>
|
||||
<if test="subjectCode != null and subjectCode != ''">
|
||||
and subject_code = #{subjectCode}
|
||||
</if>
|
||||
<if test="accountingStrategy != null and accountingStrategy != ''">
|
||||
and accounting_strategy = #{accountingStrategy}
|
||||
</if>
|
||||
<if test="accountingStrategyCode != null and accountingStrategyCode != ''">
|
||||
and accounting_strategy_code = #{accountingStrategyCode}
|
||||
</if>
|
||||
<if test="billingAttributes != null and billingAttributes != ''">
|
||||
and billing_attributes = #{billingAttributes}
|
||||
</if>
|
||||
<if test="billingAttributesCode != null and billingAttributesCode != ''">
|
||||
and billing_attributes_code = #{billingAttributesCode}
|
||||
</if>
|
||||
<if test="subjectEffectiveDate != null ">
|
||||
and subject_effective_date = #{subjectEffectiveDate}
|
||||
</if>
|
||||
<if test="subjectExpirationDate != null ">
|
||||
and subject_expiration_date = #{subjectExpirationDate}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.contractManageDetail.repository.todo.ContractManageDetailDO"
|
||||
resultType="com.mhd.basic.domain.contractManageDetail.repository.po.ContractManageDetailPO">
|
||||
<include refid="selectContractManageDetailPo"/>
|
||||
<include refid="selectContractManageDetailPo1"/>
|
||||
</select>
|
||||
<select id="getListByContractManageId"
|
||||
resultType="com.mhd.basic.domain.contractManageDetail.repository.po.ContractManageDetailPO" parameterType="java.lang.Long">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
contract_manage_detail
|
||||
WHERE
|
||||
contract_manage_id = #{contractManageId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,192 @@
|
||||
<?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.mhd.basic.domain.contractManage.repository.mapper.ContractManageMapper">
|
||||
|
||||
|
||||
<sql id="selectContractManagePo">
|
||||
select
|
||||
*
|
||||
from contract_manage
|
||||
where
|
||||
del_flag = 1
|
||||
</sql>
|
||||
|
||||
<sql id="selectContractManagePo1">
|
||||
<where>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="contractNumber != null and contractNumber != ''">
|
||||
and contract_number = #{contractNumber}
|
||||
</if>
|
||||
<if test="contractName != null and contractName != ''">
|
||||
and contract_name like concat('%', #{contractName}, '%')
|
||||
</if>
|
||||
<if test="commonContractFlag != null ">
|
||||
and common_contract_flag = #{commonContractFlag}
|
||||
</if>
|
||||
<if test="contractType != null ">
|
||||
and contract_type = #{contractType}
|
||||
</if>
|
||||
<if test="contractState != null ">
|
||||
and contract_state = #{contractState}
|
||||
</if>
|
||||
<if test="signingUnit != null and signingUnit != ''">
|
||||
and signing_unit = #{signingUnit}
|
||||
</if>
|
||||
<if test="settlementCustomers != null and settlementCustomers != ''">
|
||||
and settlement_customers = #{settlementCustomers}
|
||||
</if>
|
||||
<if test="settlementCustomersId != null ">
|
||||
and settlement_customers_id = #{settlementCustomersId}
|
||||
</if>
|
||||
<if test="settlementCustomersCode != null and settlementCustomersCode != ''">
|
||||
and settlement_customers_code = #{settlementCustomersCode}
|
||||
</if>
|
||||
<if test="ourIdentity != null ">
|
||||
and our_identity = #{ourIdentity}
|
||||
</if>
|
||||
<if test="accountingPeriod != null ">
|
||||
and accounting_period = #{accountingPeriod}
|
||||
</if>
|
||||
<if test="signingDate != null ">
|
||||
and signing_date = #{signingDate}
|
||||
</if>
|
||||
<if test="effectiveDate != null ">
|
||||
and effective_date = #{effectiveDate}
|
||||
</if>
|
||||
<if test="expirationDate != null ">
|
||||
and expiration_date = #{expirationDate}
|
||||
</if>
|
||||
<if test="contractOriginalUrl != null and contractOriginalUrl != ''">
|
||||
and contract_original_url = #{contractOriginalUrl}
|
||||
</if>
|
||||
<if test="integrityAgreementUrl != null and integrityAgreementUrl != ''">
|
||||
and integrity_agreement_url = #{integrityAgreementUrl}
|
||||
</if>
|
||||
<if test="securityProtocolUrl != null and securityProtocolUrl != ''">
|
||||
and security_protocol_url = #{securityProtocolUrl}
|
||||
</if>
|
||||
<if test="otherAttachmentsUrl != null and otherAttachmentsUrl != ''">
|
||||
and other_attachments_url = #{otherAttachmentsUrl}
|
||||
</if>
|
||||
<if test="ourSinged != null and ourSinged != ''">
|
||||
and our_singed = #{ourSinged}
|
||||
</if>
|
||||
<if test="ourSingedPhone != null and ourSingedPhone != ''">
|
||||
and our_singed_phone = #{ourSingedPhone}
|
||||
</if>
|
||||
<if test="ourOperator != null and ourOperator != ''">
|
||||
and our_operator = #{ourOperator}
|
||||
</if>
|
||||
<if test="ourOperatorPhone != null and ourOperatorPhone != ''">
|
||||
and our_operator_phone = #{ourOperatorPhone}
|
||||
</if>
|
||||
<if test="theySinged != null and theySinged != ''">
|
||||
and they_singed = #{theySinged}
|
||||
</if>
|
||||
<if test="theySingedPhone != null and theySingedPhone != ''">
|
||||
and they_singed_phone = #{theySingedPhone}
|
||||
</if>
|
||||
<if test="theyOperator != null and theyOperator != ''">
|
||||
and they_operator = #{theyOperator}
|
||||
</if>
|
||||
<if test="theyOperatorPhone != null and theyOperatorPhone != ''">
|
||||
and they_operator_phone = #{theyOperatorPhone}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.contractManage.repository.todo.ContractManageDO"
|
||||
resultType="com.mhd.basic.domain.contractManage.repository.po.ContractManagePO">
|
||||
<include refid="selectContractManagePo"/>
|
||||
<include refid="common_where"/>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="queryEffectiveList" resultType="com.mhd.basic.domain.contractManage.repository.po.ContractManagePO" parameterType="com.mhd.basic.domain.contractManage.repository.todo.ContractManageDO">
|
||||
select
|
||||
*
|
||||
from contract_manage
|
||||
where
|
||||
del_flag = 1
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="contractManageDO.contractNumber != null and contractManageDO.contractNumber != ''">
|
||||
and contract_number like concat('%', #{contractManageDO.contractNumber}, '%')
|
||||
</if>
|
||||
<if test="contractManageDO.originalContractNumber != null and contractManageDO.originalContractNumber != ''">
|
||||
and original_contract_number like concat('%', #{contractManageDO.originalContractNumber}, '%')
|
||||
</if>
|
||||
<if test="contractManageDO.commonContractFlag != null">
|
||||
and common_contract_flag = #{contractManageDO.commonContractFlag}
|
||||
</if>
|
||||
<if test="contractManageDO.contractType != null">
|
||||
and contract_type = #{contractManageDO.contractType}
|
||||
</if>
|
||||
<if test="contractManageDO.settlementCustomersCode != null">
|
||||
and settlement_customers_code = #{contractManageDO.settlementCustomersCode}
|
||||
</if>
|
||||
<if test="contractManageDO.signingUnit != null and contractManageDO.signingUnit != ''">
|
||||
and signing_unit like concat('%', #{contractManageDO.signingUnit}, '%')
|
||||
</if>
|
||||
<if test="contractManageDO.contractName != null and contractManageDO.contractName != ''">
|
||||
and contract_name like concat('%', #{contractManageDO.contractName}, '%')
|
||||
</if>
|
||||
<if test="contractManageDO.contractState != null">
|
||||
and contract_state = #{contractManageDO.contractState}
|
||||
</if>
|
||||
<if test="contractManageDO.signingDateStart != null and contractManageDO.signingDateStart != ''">
|
||||
AND date_format(signing_date,'%Y-%m-%d') <![CDATA[>=]]> #{contractManageDO.signingDateStart}
|
||||
</if>
|
||||
<if test="contractManageDO.signingDateEnd != null and contractManageDO.signingDateEnd != ''">
|
||||
AND date_format(signing_date,'%Y-%m-%d') <![CDATA[<=]]> #{contractManageDO.signingDateEnd}
|
||||
</if>
|
||||
|
||||
<if test="contractManageDO.effectiveDateStart != null and contractManageDO.effectiveDateStart != ''">
|
||||
AND date_format(effective_date,'%Y-%m-%d') <![CDATA[>=]]> #{contractManageDO.effectiveDateStart}
|
||||
</if>
|
||||
<if test="contractManageDO.effectiveDateEnd != null and contractManageDO.effectiveDateEnd != ''">
|
||||
AND date_format(effective_date,'%Y-%m-%d') <![CDATA[<=]]> #{contractManageDO.effectiveDateEnd}
|
||||
</if>
|
||||
|
||||
<if test="contractManageDO.expirationDateStart != null and contractManageDO.expirationDateStart != ''">
|
||||
AND date_format(expiration_date,'%Y-%m-%d') <![CDATA[>=]]> #{contractManageDO.expirationDateStart}
|
||||
</if>
|
||||
<if test="contractManageDO.expirationDateEnd != null and contractManageDO.expirationDateEnd != ''">
|
||||
AND date_format(expiration_date,'%Y-%m-%d') <![CDATA[<=]]> #{contractManageDO.expirationDateEnd}
|
||||
</if>
|
||||
<if test="contractManageDO.effectiveDateString != null and contractManageDO.effectiveDateString != ''
|
||||
and contractManageDO.expirationDateString != null and contractManageDO.expirationDateString != ''">
|
||||
AND (
|
||||
date_format(effective_date,'%Y-%m-%d') <![CDATA[>=]]> #{contractManageDO.effectiveDateString}
|
||||
OR date_format(expiration_date,'%Y-%m-%d') <![CDATA[<=]]> #{contractManageDO.expirationDateString}
|
||||
)
|
||||
</if>
|
||||
<if test="contractManageDO.nowDateString != null and contractManageDO.nowDateString != ''">
|
||||
AND (
|
||||
date_format(expiration_date,'%Y-%m-%d') <![CDATA[>=]]> #{contractManageDO.nowDateString}
|
||||
AND date_format(effective_date,'%Y-%m-%d') <![CDATA[<=]]> #{contractManageDO.nowDateString}
|
||||
)
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,256 @@
|
||||
<?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.mhd.basic.domain.expenseAccount.repository.mapper.ExpenseAccountMapper">
|
||||
|
||||
<resultMap type="com.mhd.basic.domain.expenseAccount.repository.po.ExpenseAccountPO" id="ExpenseAccountResult">
|
||||
<result property="expenseAccountId" column="expense_account_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="subjectCode" column="subject_code" />
|
||||
<result property="subjectName" column="subject_name" />
|
||||
<result property="billingAttributesCode" column="billing_attributes_code" />
|
||||
<result property="billingAttributes" column="billing_attributes" />
|
||||
<result property="belongModuleCode" column="belong_module_code" />
|
||||
<result property="belongModule" column="belong_module" />
|
||||
<result property="firstSubjectFlag" column="first_subject_flag" />
|
||||
<result property="upperSubjectCode" column="upper_subject_code" />
|
||||
<result property="upperSubject" column="upper_subject" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="serviceItemsManageId" column="service_items_manage_id" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectExpenseAccountPo">
|
||||
select * from expense_account
|
||||
</sql>
|
||||
|
||||
<sql id="selectExpenseAccountPo1">
|
||||
<where>
|
||||
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="subjectCode != null and subjectCode != ''">
|
||||
and subject_code = #{subjectCode}
|
||||
</if>
|
||||
<if test="subjectName != null and subjectName != ''">
|
||||
and subject_name like concat('%', #{subjectName}, '%')
|
||||
</if>
|
||||
<if test="billingAttributesCode != null and billingAttributesCode != ''">
|
||||
and billing_attributes_code = #{billingAttributesCode}
|
||||
</if>
|
||||
<if test="billingAttributes != null and billingAttributes != ''">
|
||||
and billing_attributes = #{billingAttributes}
|
||||
</if>
|
||||
<if test="belongModuleCode != null and belongModuleCode != ''">
|
||||
and belong_module_code = #{belongModuleCode}
|
||||
</if>
|
||||
<if test="belongModule != null and belongModule != ''">
|
||||
and belong_module = #{belongModule}
|
||||
</if>
|
||||
<if test="firstSubjectFlag != null ">
|
||||
and first_subject_flag = #{firstSubjectFlag}
|
||||
</if>
|
||||
<if test="upperSubjectCode != null and upperSubjectCode != ''">
|
||||
and upper_subject_code = #{upperSubjectCode}
|
||||
</if>
|
||||
<if test="upperSubject != null and upperSubject != ''">
|
||||
and upper_subject = #{upperSubject}
|
||||
</if>
|
||||
<if test="status != null ">
|
||||
and status = #{status}
|
||||
</if>
|
||||
<if test="serviceItemsManageId != null ">
|
||||
and service_items_manage_id = #{serviceItemsManageId}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.expenseAccount.repository.todo.ExpenseAccountDO"
|
||||
resultType="com.mhd.basic.domain.expenseAccount.repository.po.ExpenseAccountPO">
|
||||
SELECT
|
||||
a.* ,
|
||||
b.tax_rate,
|
||||
b.service_items_name,
|
||||
b.service_items_code
|
||||
FROM
|
||||
expense_account a
|
||||
LEFT JOIN service_items_manage b ON a.service_items_manage_id = b.service_items_manage_id
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
<include refid="common_where"/>
|
||||
order by account_type,service_items_code,upper_subject_code,show_seq
|
||||
</select>
|
||||
<select id="selectCostSubject" parameterType="com.mhd.basic.domain.expenseAccount.repository.todo.ExpenseAccountDO"
|
||||
resultType="com.mhd.basic.domain.expenseAccount.repository.po.ExpenseAccountPO">
|
||||
select
|
||||
*
|
||||
from expense_account
|
||||
where
|
||||
del_flag = 1
|
||||
and status = 1
|
||||
and first_subject_flag = 1
|
||||
<include refid="common_where_two"></include>
|
||||
</select>
|
||||
<select id="selectAllCostSubject"
|
||||
resultType="com.mhd.basic.domain.expenseAccount.repository.po.ExpenseAccountPO">
|
||||
select
|
||||
*
|
||||
from expense_account
|
||||
where
|
||||
del_flag = 1
|
||||
and status = 1
|
||||
and first_subject_flag = 2
|
||||
and upper_subject_code = #{subjectCode}
|
||||
</select>
|
||||
|
||||
<select id="getInfoByCode" resultType="com.mhd.basic.domain.expenseAccount.repository.po.ExpenseAccountPO" parameterType="com.mhd.basic.domain.expenseAccount.repository.todo.ExpenseAccountDO">
|
||||
SELECT
|
||||
a.* ,
|
||||
b.tax_rate,
|
||||
b.service_items_name,
|
||||
b.service_items_code
|
||||
FROM
|
||||
expense_account a
|
||||
LEFT JOIN service_items_manage b ON a.service_items_manage_id = b.service_items_manage_id
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
AND a.top_organization_id = #{expenseAccountDO.topOrganizationId}
|
||||
AND a.subject_code = #{expenseAccountDO.subjectCode}
|
||||
AND a.status = 1
|
||||
</select>
|
||||
|
||||
|
||||
<sql id="common_where_two">
|
||||
<if test="expenseAccountDO.topOrganizationId != null ">
|
||||
and top_organization_id = #{expenseAccountDO.topOrganizationId}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="expenseAccountDO.subjectName != null and expenseAccountDO.subjectName != ''">
|
||||
and a.subject_name like concat('%', #{expenseAccountDO.subjectName}, '%')
|
||||
</if>
|
||||
<if test="expenseAccountDO.subjectCode != null and expenseAccountDO.subjectCode != ''">
|
||||
and a.subject_code like concat('%', #{expenseAccountDO.subjectCode}, '%')
|
||||
</if>
|
||||
<if test="expenseAccountDO.belongModuleCode != null and expenseAccountDO.belongModuleCode != ''">
|
||||
and a.belong_module_code = #{expenseAccountDO.belongModuleCode}
|
||||
</if>
|
||||
<if test="expenseAccountDO.upperSubjectCode != null and expenseAccountDO.upperSubjectCode != ''">
|
||||
and a.upper_subject_code = #{expenseAccountDO.upperSubjectCode}
|
||||
</if>
|
||||
<if test="expenseAccountDO.upperSubject != null and expenseAccountDO.upperSubject != ''">
|
||||
and a.upper_subject like concat('%', #{expenseAccountDO.upperSubject}, '%')
|
||||
</if>
|
||||
<if test="expenseAccountDO.status != null ">
|
||||
and a.status = #{expenseAccountDO.status}
|
||||
</if>
|
||||
<if test="expenseAccountDO.remark != null and expenseAccountDO.remark != ''">
|
||||
and a.remark like concat('%', #{expenseAccountDO.remark}, '%')
|
||||
</if>
|
||||
<if test="expenseAccountDO.createTimeStart != null and expenseAccountDO.createTimeStart != ''">
|
||||
AND date_format(a.create_time,'%Y-%m-%d') <![CDATA[>=]]> #{expenseAccountDO.createTimeStart}
|
||||
</if>
|
||||
<if test="expenseAccountDO.createTimeEnd != null and expenseAccountDO.createTimeEnd != ''">
|
||||
AND date_format(a.create_time,'%Y-%m-%d') <![CDATA[<=]]> #{expenseAccountDO.createTimeEnd}
|
||||
</if>
|
||||
<if test="expenseAccountDO.createByName != null and expenseAccountDO.createByName != ''">
|
||||
and a.create_by_name like concat('%', #{expenseAccountDO.createByName}, '%')
|
||||
</if>
|
||||
<if test="expenseAccountDO.updateByName != null and expenseAccountDO.updateByName != ''">
|
||||
and a.update_by_name like concat('%', #{expenseAccountDO.updateByName}, '%')
|
||||
</if>
|
||||
<if test="expenseAccountDO.updateTimeStart != null and expenseAccountDO.updateTimeStart != ''">
|
||||
AND date_format(a.update_time,'%Y-%m-%d') <![CDATA[>=]]> #{expenseAccountDO.updateTimeStart}
|
||||
</if>
|
||||
<if test="expenseAccountDO.updateTimeEnd != null and expenseAccountDO.updateTimeEnd != ''">
|
||||
AND date_format(a.update_time,'%Y-%m-%d') <![CDATA[<=]]> #{expenseAccountDO.updateTimeEnd}
|
||||
</if>
|
||||
<if test="expenseAccountDO.topOrganizationId != null ">
|
||||
and a.top_organization_id = #{expenseAccountDO.topOrganizationId}
|
||||
</if>
|
||||
<if test="expenseAccountDO.serviceItemsCode != null and expenseAccountDO.serviceItemsCode != ''">
|
||||
and b.service_items_code = #{expenseAccountDO.serviceItemsCode}
|
||||
</if>
|
||||
</sql>
|
||||
<select id="selectExpenseAccount" parameterType="com.mhd.basic.domain.expenseAccount.repository.todo.SearchExpenseAccountDO" resultType="com.mhd.basic.domain.expenseAccount.repository.po.QueryExpenseAccountPO">
|
||||
select
|
||||
a.*
|
||||
from
|
||||
expense_account a
|
||||
LEFT JOIN service_items_manage b ON a.service_items_manage_id = b.service_items_manage_id
|
||||
where
|
||||
b.service_items_code= #{searchExpenseAccountDO.serviceItemsCode}
|
||||
and upper_subject_code=#{searchExpenseAccountDO.upperSubjectCode}
|
||||
and a.account_type=1
|
||||
<if test="searchExpenseAccountDO.ownStatus != null ">
|
||||
and a.own_status = #{searchExpenseAccountDO.ownStatus}
|
||||
</if>
|
||||
<if test="searchExpenseAccountDO.societyStatus != null ">
|
||||
and a.society_status = #{searchExpenseAccountDO.societyStatus}
|
||||
</if>
|
||||
and a.del_flag=1
|
||||
order by show_seq
|
||||
</select>
|
||||
|
||||
<select id="selectOtherExpenseAccount" parameterType="com.mhd.basic.domain.expenseAccount.repository.todo.SearchExpenseAccountDO" resultType="com.mhd.basic.domain.expenseAccount.repository.po.QueryExpenseAccountPO">
|
||||
select
|
||||
a.*
|
||||
from
|
||||
expense_account a
|
||||
LEFT JOIN service_items_manage b ON a.service_items_manage_id = b.service_items_manage_id
|
||||
where
|
||||
a.account_type=2
|
||||
<if test="searchExpenseAccountDO.serviceItemsCode != null ">
|
||||
and a.service_items_code = #{searchExpenseAccountDO.serviceItemsCode}
|
||||
</if>
|
||||
<if test="searchExpenseAccountDO.upperSubjectCode != null ">
|
||||
and a.upper_subject_code = #{searchExpenseAccountDO.upperSubjectCode}
|
||||
</if>
|
||||
<if test="searchExpenseAccountDO.ownStatus != null ">
|
||||
and a.own_status = #{searchExpenseAccountDO.ownStatus}
|
||||
</if>
|
||||
<if test="searchExpenseAccountDO.societyStatus != null ">
|
||||
and a.society_status = #{searchExpenseAccountDO.societyStatus}
|
||||
</if>
|
||||
and a.del_flag=1
|
||||
order by show_seq
|
||||
</select>
|
||||
|
||||
<select id="selectSocialVehicleExpenseAccount" resultType="com.mhd.basic.domain.expenseAccount.repository.po.QueryExpenseAccountPO">
|
||||
select
|
||||
a.*
|
||||
from
|
||||
expense_account a
|
||||
LEFT JOIN service_items_manage b ON a.service_items_manage_id = b.service_items_manage_id
|
||||
where
|
||||
b.service_items_code= 'SHCL' and first_subject_flag =2
|
||||
and a.del_flag=1
|
||||
order by show_seq
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?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.mhd.basic.domain.projectManage.repository.mapper.ProjectManageMapper">
|
||||
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.projectManage.repository.todo.ProjectManageDO" resultType="com.mhd.basic.domain.projectManage.repository.po.ProjectManagePO">
|
||||
select
|
||||
*
|
||||
from project_manage
|
||||
where del_flag = 1
|
||||
<include refid="common_where"/>
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="projectManageDO.projectName != null and projectManageDO.projectName != ''">
|
||||
and project_name like concat('%', #{projectManageDO.projectName}, '%')
|
||||
</if>
|
||||
<if test="projectManageDO.projectCode != null and projectManageDO.projectCode != ''">
|
||||
and project_code like concat('%', #{projectManageDO.projectCode}, '%')
|
||||
</if>
|
||||
<if test="projectManageDO.projectStats != null ">
|
||||
and project_stats = #{projectManageDO.projectStats}
|
||||
</if>
|
||||
<if test="projectManageDO.settlementCustomers != null and projectManageDO.settlementCustomers != ''">
|
||||
and settlement_customers like concat('%', #{projectManageDO.settlementCustomers}, '%')
|
||||
</if>
|
||||
<if test="projectManageDO.remark != null and projectManageDO.remark != ''">
|
||||
and remark like concat('%', #{projectManageDO.remark}, '%')
|
||||
</if>
|
||||
<if test="projectManageDO.createTimeStart != null and projectManageDO.createTimeStart != ''">
|
||||
AND date_format(create_time,'%Y-%m-%d') <![CDATA[>=]]> #{projectManageDO.createTimeStart}
|
||||
</if>
|
||||
<if test="projectManageDO.createTimeEnd != null and projectManageDO.createTimeEnd != ''">
|
||||
AND date_format(create_time,'%Y-%m-%d') <![CDATA[<=]]> #{projectManageDO.createTimeEnd}
|
||||
</if>
|
||||
<if test="projectManageDO.createByName != null and projectManageDO.createByName != ''">
|
||||
and create_by_name like concat('%', #{projectManageDO.createByName}, '%')
|
||||
</if>
|
||||
<if test="projectManageDO.updateByName != null and projectManageDO.updateByName != ''">
|
||||
and update_by_name like concat('%', #{projectManageDO.updateByName}, '%')
|
||||
</if>
|
||||
<if test="projectManageDO.updateTimeStart != null and projectManageDO.updateTimeStart != ''">
|
||||
AND date_format(update_time,'%Y-%m-%d') <![CDATA[>=]]> #{projectManageDO.updateTimeStart}
|
||||
</if>
|
||||
<if test="projectManageDO.updateTimeEnd != null and projectManageDO.updateTimeEnd != ''">
|
||||
AND date_format(update_time,'%Y-%m-%d') <![CDATA[<=]]> #{projectManageDO.updateTimeEnd}
|
||||
</if>
|
||||
|
||||
<if test="projectManageDO.projectBeginTimeStart != null and projectManageDO.projectBeginTimeStart != ''">
|
||||
AND date_format(begin_date,'%Y-%m-%d') <![CDATA[>=]]> #{projectManageDO.projectBeginTimeStart}
|
||||
</if>
|
||||
<if test="projectManageDO.projectBeginTimeEnd != null and projectManageDO.projectBeginTimeEnd != ''">
|
||||
AND date_format(begin_date,'%Y-%m-%d') <![CDATA[<=]]> #{projectManageDO.projectBeginTimeEnd}
|
||||
</if>
|
||||
<if test="projectManageDO.projectEndTimeStart != null and projectManageDO.projectEndTimeStart != ''">
|
||||
AND date_format(end_date,'%Y-%m-%d') <![CDATA[>=]]> #{projectManageDO.projectEndTimeStart}
|
||||
</if>
|
||||
<if test="projectManageDO.projectEndTimeEnd != null and projectManageDO.projectEndTimeEnd != ''">
|
||||
AND date_format(end_date,'%Y-%m-%d') <![CDATA[<=]]> #{projectManageDO.projectEndTimeEnd}
|
||||
</if>
|
||||
<if test="projectManageDO.topOrganizationId != null ">
|
||||
and top_organization_id = #{projectManageDO.topOrganizationId}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,72 @@
|
||||
<?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.mhd.basic.domain.serviceItemsManage.repository.mapper.ServiceItemsManageMapper">
|
||||
|
||||
|
||||
|
||||
<sql id="selectServiceItemsManagePo1">
|
||||
<where>
|
||||
del_flag = 1
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="serviceItemsCode != null and serviceItemsCode != ''">
|
||||
and service_items_code = #{serviceItemsCode}
|
||||
</if>
|
||||
<if test="serviceItemsName != null and serviceItemsName != ''">
|
||||
and service_items_name like concat('%', #{serviceItemsName}, '%')
|
||||
</if>
|
||||
<if test="taxRate != null ">
|
||||
and tax_rate = #{taxRate}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
and remark like concat('%', #{remark}, '%')
|
||||
</if>
|
||||
<if test="createTimeStart != null and createTimeStart != ''">
|
||||
AND date_format(create_time,'%Y-%m-%d') <![CDATA[>=]]> #{createTimeStart}
|
||||
</if>
|
||||
<if test="createTimeEnd != null and createTimeEnd != ''">
|
||||
AND date_format(create_time,'%Y-%m-%d') <![CDATA[<=]]> #{createTimeEnd}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<if test="updateTimeStart != null and updateTimeStart != ''">
|
||||
AND date_format(update_time,'%Y-%m-%d') <![CDATA[>=]]> #{updateTimeStart}
|
||||
</if>
|
||||
<if test="updateTimeEnd != null and updateTimeEnd != ''">
|
||||
AND date_format(update_time,'%Y-%m-%d') <![CDATA[<=]]> #{updateTimeEnd}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.serviceItemsManage.repository.todo.ServiceItemsManageDO"
|
||||
resultType="com.mhd.basic.domain.serviceItemsManage.repository.po.ServiceItemsManagePO">
|
||||
select * from service_items_manage
|
||||
<include refid="selectServiceItemsManagePo1"/>
|
||||
</select>
|
||||
|
||||
<select id="selectServiceTypes"
|
||||
resultType="com.mhd.basic.domain.serviceItemsManage.repository.po.ServiceItemsManagePO">
|
||||
select organization_name,service_items_code,service_items_name,tax_rate,CONCAT(service_items_name,service_items_code) cost_type
|
||||
from service_items_manage
|
||||
where del_flag = 1
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,52 @@
|
||||
<?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.mhd.basic.domain.sysAppVersionManage.repository.mapper.SysAppVersionManageMapper">
|
||||
|
||||
<sql id="selectSysAppVersionManageVo">
|
||||
SELECT
|
||||
a.*
|
||||
FROM
|
||||
sys_app_version_manage a
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectSysAppVersionManageList" parameterType="com.mhd.basic.domain.sysAppVersionManage.repository.todo.SysAppVersionManageDo"
|
||||
resultType="com.mhd.basic.domain.sysAppVersionManage.repository.po.SysAppVersionManagePo">
|
||||
<include refid="selectSysAppVersionManageVo"/>
|
||||
<include refid="common_where"></include>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
AND a.app_latest_flag = 1
|
||||
<if test="sysAppVersionManageDo.topOrganizationId != null">
|
||||
AND a.top_organization_id = #{sysAppVersionManageDo.topOrganizationId}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectSysAppVersionManageBySysAppVersionManageId" parameterType="java.lang.Long"
|
||||
resultType="com.mhd.basic.domain.sysAppVersionManage.repository.po.SysAppVersionManagePo">
|
||||
<include refid="selectSysAppVersionManageVo"/>
|
||||
and a.sys_app_version_manage_id = #{sysAppVersionManageId}
|
||||
</select>
|
||||
|
||||
<select id="selectAppVersionHistoryList" resultType="com.mhd.basic.domain.sysAppVersionManage.repository.po.SysAppVersionManagePo" parameterType="com.mhd.basic.domain.sysAppVersionManage.entity.SysAppVersionManage">
|
||||
<include refid="selectSysAppVersionManageVo"/>
|
||||
<include refid="common_where_two"></include>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
<sql id="common_where_two">
|
||||
AND a.app_latest_flag = 2
|
||||
<if test="sysAppVersionManage.appSystemTypeCode != null and sysAppVersionManage.appSystemTypeCode != ''">
|
||||
AND a.app_system_type_code = #{sysAppVersionManage.appSystemTypeCode}
|
||||
</if>
|
||||
<if test="sysAppVersionManage.appTypeCode != null and sysAppVersionManage.appTypeCode != ''">
|
||||
AND a.app_type_code = #{sysAppVersionManage.appTypeCode}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,98 @@
|
||||
<?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.mhd.basic.domain.areaAggregate.repository.mapper.SysCityMapper">
|
||||
<sql id="selectVo">
|
||||
SELECT a.city_id,
|
||||
a.city_code,
|
||||
a.city_code_new,
|
||||
a.province_code,
|
||||
a.city_name,
|
||||
a.city_remark,
|
||||
a.create_time,
|
||||
a.create_by,
|
||||
a.create_by_name,
|
||||
a.update_time,
|
||||
a.update_by,
|
||||
a.update_by_name,
|
||||
a.del_flag
|
||||
FROM `sys_city` a
|
||||
WHERE a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectList"
|
||||
parameterType="com.mhd.basic.domain.areaAggregate.repository.todo.SysProvinceCityCountyDO"
|
||||
resultType="com.mhd.basic.domain.areaAggregate.entity.SysCityEntity">
|
||||
<include refid="selectVo"></include>
|
||||
<include refid="common_where"></include>
|
||||
</select>
|
||||
<select id="selectCityAreaList"
|
||||
parameterType="com.mhd.basic.domain.areaAggregate.repository.todo.SysProvinceCityCountyDO"
|
||||
resultType="com.mhd.basic.domain.areaAggregate.repository.po.SysAreaPO">
|
||||
SELECT a.city_id as areaId,
|
||||
a.province_code as parentAreaCode,
|
||||
a.city_code as areaCode,
|
||||
a.city_code_new as areaCodeNew,
|
||||
a.city_name as areaName,
|
||||
a.city_remark as areaRemark,
|
||||
a.create_time,
|
||||
a.create_by,
|
||||
a.create_by_name,
|
||||
a.update_time,
|
||||
a.update_by,
|
||||
a.update_by_name,
|
||||
a.del_flag
|
||||
FROM `sys_city` a
|
||||
WHERE a.del_flag = 1
|
||||
<include refid="common_where"></include>
|
||||
</select>
|
||||
<select id="findById"
|
||||
parameterType="java.lang.Long"
|
||||
resultType="com.mhd.basic.domain.areaAggregate.entity.SysCityEntity">
|
||||
<include refid="selectVo"></include>
|
||||
and a.city_id = #{value}
|
||||
</select>
|
||||
<select id="findByCityCode"
|
||||
parameterType="java.lang.Long"
|
||||
resultType="com.mhd.basic.domain.areaAggregate.entity.SysCityEntity">
|
||||
<include refid="selectVo"></include>
|
||||
and a.city_code = #{value}
|
||||
</select>
|
||||
|
||||
<select id="findCityMaxCode"
|
||||
parameterType="java.lang.Long"
|
||||
resultType="com.mhd.basic.domain.areaAggregate.entity.SysCityEntity">
|
||||
SELECT
|
||||
city_id,
|
||||
city_code,
|
||||
city_code_new,
|
||||
province_code,
|
||||
city_name,
|
||||
city_remark
|
||||
FROM
|
||||
`sys_city`
|
||||
WHERE
|
||||
province_code = #{values}
|
||||
ORDER BY
|
||||
city_code_new DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="cityId !=null and cityId !='' ">
|
||||
and a.city_id = #{cityId}
|
||||
</if>
|
||||
<if test="cityCode !=null and cityCode !='' ">
|
||||
and a.city_code = #{cityCode}
|
||||
</if>
|
||||
<if test="cityCodeNew !=null and cityCodeNew !='' ">
|
||||
and a.city_code_new = #{cityCodeNew}
|
||||
</if>
|
||||
<if test="provinceCode !=null and provinceCode !='' ">
|
||||
and a.province_code = #{provinceCode}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,169 @@
|
||||
<?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.mhd.basic.domain.areaAggregate.repository.mapper.SysCountyMapper">
|
||||
<sql id="selectVo">
|
||||
SELECT a.county_id,
|
||||
a.county_code,
|
||||
a.county_code_new,
|
||||
a.city_code,
|
||||
a.county_name,
|
||||
a.county_remark,
|
||||
a.create_time,
|
||||
a.create_by,
|
||||
a.create_by_name,
|
||||
a.update_time,
|
||||
a.update_by,
|
||||
a.update_by_name,
|
||||
a.del_flag
|
||||
FROM `sys_county` a
|
||||
WHERE a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectList" parameterType="com.mhd.basic.domain.areaAggregate.repository.todo.SysProvinceCityCountyDO"
|
||||
resultType="com.mhd.basic.domain.areaAggregate.entity.SysCountyEntity">
|
||||
<include refid="selectVo"></include>
|
||||
<include refid="common_where"></include>
|
||||
</select>
|
||||
<select id="selectCountyAreaList"
|
||||
parameterType="com.mhd.basic.domain.areaAggregate.repository.todo.SysProvinceCityCountyDO"
|
||||
resultType="com.mhd.basic.domain.areaAggregate.repository.po.SysAreaPO">
|
||||
SELECT a.county_id as areaId,
|
||||
a.city_code as parentAreaCode,
|
||||
a.county_code as areaCode,
|
||||
a.county_code_new as areaCodeNew,
|
||||
a.county_name as areaName,
|
||||
a.county_remark as areaRemark,
|
||||
a.create_time,
|
||||
a.create_by,
|
||||
a.create_by_name,
|
||||
a.update_time,
|
||||
a.update_by,
|
||||
a.update_by_name,
|
||||
a.del_flag
|
||||
FROM
|
||||
`sys_county` a
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
<include refid="common_where"></include>
|
||||
</select>
|
||||
|
||||
<select id="findById" parameterType="java.lang.Long"
|
||||
resultType="com.mhd.basic.domain.areaAggregate.entity.SysCountyEntity">
|
||||
<include refid="selectVo"></include>
|
||||
and a.county_id = #{value}
|
||||
</select>
|
||||
<select id="findByCountyCode" parameterType="java.lang.Long"
|
||||
resultType="com.mhd.basic.domain.areaAggregate.entity.SysCountyEntity">
|
||||
<include refid="selectVo"></include>
|
||||
and a.county_code = #{value}
|
||||
</select>
|
||||
|
||||
<select id="findCountyMaxCode" parameterType="java.lang.Long"
|
||||
resultType="com.mhd.basic.domain.areaAggregate.entity.SysCountyEntity">
|
||||
SELECT county_id,
|
||||
county_code,
|
||||
county_code_new,
|
||||
city_code,
|
||||
county_name,
|
||||
county_remark
|
||||
FROM `sys_county`
|
||||
WHERE city_code = #{values}
|
||||
ORDER BY county_code_new DESC LIMIT 1
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="countyId !=null and countyId !='' ">
|
||||
and a.county_id = #{countyId}
|
||||
</if>
|
||||
<if test="countyCode !=null and countyCode !='' ">
|
||||
and a.county_code = #{countyCode}
|
||||
</if>
|
||||
<if test="cityCodeNew !=null and cityCodeNew !='' ">
|
||||
and a.city_code_new = #{cityCodeNew}
|
||||
</if>
|
||||
<if test="cityCode !=null and cityCode !='' ">
|
||||
and a.city_code = #{cityCode}
|
||||
</if>
|
||||
<if test="provinceCode !=null and provinceCode !='' ">
|
||||
and a.province_code = #{provinceCode}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<!-- 根据县区编码查询省市县名称 -->
|
||||
<select id="findAreaInfo" parameterType="com.mhd.basic.domain.areaAggregate.repository.todo.SysProvinceCityCountyDO"
|
||||
resultType="com.mhd.basic.domain.areaAggregate.repository.po.SysAreaPO">
|
||||
SELECT
|
||||
a.county_id AS areaId,
|
||||
a.city_code AS parentAreaCode,
|
||||
a.county_code AS areaCode,
|
||||
a.county_code_new AS areaCodeNew,
|
||||
a.county_name AS areaName,
|
||||
a.county_remark AS areaRemark,
|
||||
a.create_time,
|
||||
a.create_by,
|
||||
a.create_by_name,
|
||||
a.update_time,
|
||||
a.update_by,
|
||||
a.update_by_name,
|
||||
a.del_flag,
|
||||
c.province_name as provinceName,
|
||||
b.city_name as cityName,
|
||||
a.county_name as countyName,
|
||||
CONCAT( c.province_name, b.city_name, a.county_name ) AS provinceCityCountyName
|
||||
FROM
|
||||
`sys_county` a
|
||||
LEFT JOIN sys_city b ON a.city_code = b.city_code
|
||||
LEFT JOIN sys_province c ON b.province_code = c.province_code
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
<include refid="common_where"></include>
|
||||
</select>
|
||||
|
||||
<select id="findAreaInfoByCityCode" resultType="com.mhd.basic.domain.areaAggregate.repository.po.SysAreaPO" parameterType="com.mhd.basic.domain.areaAggregate.repository.todo.SysProvinceCityCountyDO">
|
||||
SELECT
|
||||
a.city_id AS areaId,
|
||||
a.province_code AS parentAreaCode,
|
||||
a.city_code AS areaCode,
|
||||
a.city_code_new AS areaCodeNew,
|
||||
a.city_name AS areaName,
|
||||
a.city_remark AS areaRemark,
|
||||
a.create_time,
|
||||
a.create_by,
|
||||
a.create_by_name,
|
||||
a.update_time,
|
||||
a.update_by,
|
||||
a.update_by_name,
|
||||
a.del_flag,
|
||||
CONCAT( b.province_name, a.city_name ) AS provinceCityCountyName
|
||||
FROM
|
||||
sys_city a
|
||||
LEFT JOIN sys_province b ON a.province_code = b.province_code
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
<include refid="common_where"></include>
|
||||
</select>
|
||||
|
||||
<select id="findAreaInfoByProvince" resultType="com.mhd.basic.domain.areaAggregate.repository.po.SysAreaPO" parameterType="com.mhd.basic.domain.areaAggregate.repository.todo.SysProvinceCityCountyDO">
|
||||
SELECT
|
||||
a.province_id AS areaId,
|
||||
a.province_code AS areaCode,
|
||||
a.province_name AS areaName,
|
||||
a.province_remark AS areaRemark,
|
||||
a.create_time,
|
||||
a.create_by,
|
||||
a.create_by_name,
|
||||
a.update_time,
|
||||
a.update_by,
|
||||
a.update_by_name,
|
||||
a.del_flag,
|
||||
a.province_name AS provinceCityCountyName
|
||||
FROM
|
||||
sys_province a
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
<include refid="common_where"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,62 @@
|
||||
<?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.mhd.basic.domain.sysMultistageDict.repository.mapper.SysMultistageDictMapper">
|
||||
|
||||
<sql id="selectSysMultistageDictVo">
|
||||
select
|
||||
a.*
|
||||
from sys_multistage_dict a
|
||||
where a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectSysMultistageDictList" parameterType="com.mhd.basic.domain.sysMultistageDict.repository.todo.SysMultistageDictDo"
|
||||
resultType="com.mhd.basic.domain.sysMultistageDict.repository.po.SysMultistageDictPo">
|
||||
<include refid="selectSysMultistageDictVo"/>
|
||||
<include refid="common_where"></include>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="sysMultistageDictDo.multistageDictName != null and sysMultistageDictDo.multistageDictName != ''">
|
||||
AND a.multistage_dict_name like concat('%', #{sysMultistageDictDo.multistageDictName}, '%')
|
||||
</if>
|
||||
<if test="sysMultistageDictDo.multistageDictCode != null and sysMultistageDictDo.multistageDictCode != ''">
|
||||
and (a.multistage_dict_code = #{sysMultistageDictDo.multistageDictCode} or a.parent_dict_code = #{sysMultistageDictDo.multistageDictCode} or a.top_parent_dict_code = #{sysMultistageDictDo.multistageDictCode})
|
||||
</if>
|
||||
<if test="sysMultistageDictDo.code != null and sysMultistageDictDo.code != ''">
|
||||
and a.multistage_dict_code = #{sysMultistageDictDo.code}
|
||||
</if>
|
||||
<if test="sysMultistageDictDo.notParentCode != null and sysMultistageDictDo.notParentCode != ''">
|
||||
and a.parent_dict_code != #{sysMultistageDictDo.notParentCode}
|
||||
</if>
|
||||
<if test="sysMultistageDictDo.parentDictCode != null and sysMultistageDictDo.parentDictCode != ''">
|
||||
and a.parent_dict_code = #{sysMultistageDictDo.parentDictCode}
|
||||
</if>
|
||||
<if test="sysMultistageDictDo.multistageDictDescribe != null and sysMultistageDictDo.multistageDictDescribe != ''">
|
||||
AND a.multistage_dict_describe like concat('%', #{sysMultistageDictDo.multistageDictDescribe}, '%')
|
||||
</if>
|
||||
<if test="sysMultistageDictDo.topParentDictCode != null and sysMultistageDictDo.topParentDictCode != ''">
|
||||
AND a.top_parent_dict_code = #{sysMultistageDictDo.topParentDictCode}
|
||||
</if>
|
||||
<if test="sysMultistageDictDo.createBy != null"> and a.create_by = #{sysMultistageDictDo.createBy}</if>
|
||||
<if test="sysMultistageDictDo.organizationIdList != null ">
|
||||
AND a.organization_id in
|
||||
<foreach item="id" collection="sysMultistageDictDo.organizationIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="sysMultistageDictDo.topOrganizationId != null">
|
||||
AND (a.top_organization_id = #{sysMultistageDictDo.topOrganizationId} or a.is_default = 1)
|
||||
</if>
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="selectSysMultistageDictBySysMultistageDictId" parameterType="java.lang.Long"
|
||||
resultType="com.mhd.basic.domain.sysMultistageDict.repository.po.SysMultistageDictPo">
|
||||
<include refid="selectSysMultistageDictVo"/>
|
||||
and a.sys_multistage_dict_id = #{sysMultistageDictId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?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.mhd.basic.domain.sysPictureManage.repository.mapper.SysPictureManageMapper">
|
||||
|
||||
<sql id="selectSysPictureManageVo">
|
||||
select
|
||||
a.*
|
||||
from
|
||||
sys_picture_manage a
|
||||
where
|
||||
a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectSysPictureManageList" parameterType="com.mhd.basic.domain.sysPictureManage.repository.todo.SysPictureManageDo" resultType="com.mhd.basic.domain.sysPictureManage.repository.po.SysPictureManagePo">
|
||||
<include refid="selectSysPictureManageVo"/>
|
||||
<include refid="common_where"></include>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="sysPictureManageDo.belongPageCode != null and sysPictureManageDo.belongPageCode != ''">
|
||||
AND a.belong_page_code = #{sysPictureManageDo.belongPageCode}
|
||||
</if>
|
||||
<if test="sysPictureManageDo.pictureTypeCode != null and sysPictureManageDo.pictureTypeCode != ''">
|
||||
AND a.picture_type_code = #{sysPictureManageDo.pictureTypeCode}
|
||||
</if>
|
||||
<if test="sysPictureManageDo.updateTimeStart != null and sysPictureManageDo.updateTimeStart != ''">
|
||||
AND date_format(a.update_time,'%Y-%m-%d') >= #{sysPictureManageDo.updateTimeStart}
|
||||
</if>
|
||||
<if test="sysPictureManageDo.updateTimeEnd != null and sysPictureManageDo.updateTimeEnd != ''">
|
||||
AND date_format(a.update_time,'%Y-%m-%d') <![CDATA[<=]]> #{sysPictureManageDo.updateTimeEnd}
|
||||
</if>
|
||||
<if test="sysPictureManageDo.topOrganizationId != null and sysPictureManageDo.topOrganizationId != ''">
|
||||
AND a.top_organization_id = #{sysPictureManageDo.topOrganizationId}
|
||||
</if>
|
||||
<if test="sysPictureManageDo.pictureStatus != null">
|
||||
AND a.picture_status = #{sysPictureManageDo.pictureStatus}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectSysPictureManageBySysPictureManageId" parameterType="java.lang.Long" resultType="com.mhd.basic.domain.sysPictureManage.repository.po.SysPictureManagePo">
|
||||
<include refid="selectSysPictureManageVo"/>
|
||||
and sys_picture_manage_id = #{sysPictureManageId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,264 @@
|
||||
<?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.mhd.basic.domain.areaAggregate.repository.mapper.SysProvinceMapper">
|
||||
<sql id="selectVo">
|
||||
SELECT a.province_id,
|
||||
a.province_code,
|
||||
a.province_name,
|
||||
a.province_remark,
|
||||
a.create_time,
|
||||
a.create_by,
|
||||
a.create_by_name,
|
||||
a.update_time,
|
||||
a.update_by,
|
||||
a.update_by_name,
|
||||
a.del_flag
|
||||
FROM `sys_province` a
|
||||
WHERE a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectList"
|
||||
parameterType="com.mhd.basic.domain.areaAggregate.repository.todo.SysProvinceCityCountyDO"
|
||||
resultType="com.mhd.basic.domain.areaAggregate.entity.SysProvinceEntity">
|
||||
<include refid="selectVo"></include>
|
||||
<include refid="common_where"></include>
|
||||
</select>
|
||||
|
||||
<select id="selectProvinceAreaList"
|
||||
parameterType="com.mhd.basic.domain.areaAggregate.repository.todo.SysProvinceCityCountyDO"
|
||||
resultType="com.mhd.basic.domain.areaAggregate.repository.po.SysAreaPO">
|
||||
SELECT a.province_id as areaId,
|
||||
a.province_code as areaCode,
|
||||
a.province_code as areaCodeNew,
|
||||
a.province_name as areaName,
|
||||
a.province_remark as areaRemark,
|
||||
a.create_time,
|
||||
a.create_by,
|
||||
a.create_by_name,
|
||||
a.update_time,
|
||||
a.update_by,
|
||||
a.update_by_name,
|
||||
a.del_flag
|
||||
FROM `sys_province` a
|
||||
WHERE a.del_flag = 1
|
||||
<include refid="common_where"></include>
|
||||
</select>
|
||||
|
||||
<select id="selectSsqhList" resultType="com.mhd.basic.domain.areaAggregate.repository.po.SysAreaPO">
|
||||
SELECT
|
||||
CONCAT( c.province_name, b.city_name, a.county_name ) areaName ,
|
||||
a.county_code areaCode
|
||||
FROM
|
||||
sys_county a
|
||||
LEFT JOIN sys_city b ON a.city_code = b.city_code
|
||||
LEFT JOIN sys_province c ON b.province_code = c.province_code
|
||||
</select>
|
||||
|
||||
<select id="selectAllAreaList"
|
||||
parameterType="com.mhd.basic.domain.areaAggregate.repository.todo.SysProvinceCityCountyDO"
|
||||
resultType="com.mhd.basic.domain.areaAggregate.repository.po.SysAreaPO">
|
||||
SELECT a.* FROM
|
||||
(SELECT
|
||||
c.province_id as areaId,
|
||||
"" as parentAreaCode,
|
||||
c.province_code AS areaCode,
|
||||
c.province_code AS areaCodeNew,
|
||||
c.province_name AS areaName,
|
||||
c.province_remark AS areaRemark,
|
||||
c.create_time,
|
||||
c.create_by,
|
||||
c.create_by_name,
|
||||
c.update_time,
|
||||
c.update_by,
|
||||
c.update_by_name,
|
||||
c.del_flag
|
||||
FROM
|
||||
`sys_county` a
|
||||
LEFT JOIN sys_city b ON a.city_code = b.city_code
|
||||
LEFT JOIN sys_province c ON b.province_code = c.province_code
|
||||
UNION
|
||||
SELECT
|
||||
b.city_id as areaId,
|
||||
b.province_code AS parentAreaCode,
|
||||
b.city_code AS areaCode,
|
||||
b.city_code_new AS areaCodeNew,
|
||||
b.city_name AS areaName,
|
||||
b.city_remark AS areaRemark,
|
||||
b.create_time,
|
||||
b.create_by,
|
||||
b.create_by_name,
|
||||
b.update_time,
|
||||
b.update_by,
|
||||
b.update_by_name,
|
||||
b.del_flag
|
||||
FROM
|
||||
`sys_county` a
|
||||
LEFT JOIN sys_city b ON a.city_code = b.city_code
|
||||
LEFT JOIN sys_province c ON b.province_code = c.province_code
|
||||
UNION
|
||||
SELECT
|
||||
a.county_id as areaId,
|
||||
a.city_code AS parentAreaCode,
|
||||
a.county_code AS areaCode,
|
||||
a.county_code_new AS areaCodeNew,
|
||||
a.county_name AS areaName,
|
||||
a.county_remark AS areaRemark,
|
||||
a.create_time,
|
||||
a.create_by,
|
||||
a.create_by_name,
|
||||
a.update_time,
|
||||
a.update_by,
|
||||
a.update_by_name,
|
||||
a.del_flag
|
||||
FROM
|
||||
`sys_county` a
|
||||
LEFT JOIN sys_city b ON a.city_code = b.city_code
|
||||
LEFT JOIN sys_province c ON b.province_code = c.province_code
|
||||
) a
|
||||
WHERE a.areaName IS NOT NULL AND a.areaName != '' AND a.del_flag = 1
|
||||
<if test="countyCodes!=null and countyCodes.size() > 0">
|
||||
and a.areaCode in <foreach item="countyCode" index="index" collection="countyCodes" open="(" separator=" , " close=")">#{countyCode}</foreach>
|
||||
</if>
|
||||
<if test="name!=null and name!=''">
|
||||
and a.areaName like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="countyCode!=null">
|
||||
and a.areaCode =#{countyCode}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectBranchAreaChildrenList"
|
||||
parameterType="com.mhd.basic.domain.areaAggregate.repository.todo.SysProvinceCityCountyDO"
|
||||
resultType="com.mhd.basic.domain.areaAggregate.repository.po.SysAreaPO">
|
||||
SELECT
|
||||
c.province_id as areaId,
|
||||
"" as parentAreaCode,
|
||||
c.province_code AS areaCode,
|
||||
c.province_code AS areaCodeNew,
|
||||
c.province_name AS areaName,
|
||||
c.province_remark AS areaRemark,
|
||||
c.create_time,
|
||||
c.create_by,
|
||||
c.create_by_name,
|
||||
c.update_time,
|
||||
c.update_by,
|
||||
c.update_by_name,
|
||||
c.del_flag
|
||||
FROM
|
||||
`sys_county` a
|
||||
LEFT JOIN sys_city b ON a.city_code = b.city_code
|
||||
LEFT JOIN sys_province c ON b.province_code = c.province_code
|
||||
|
||||
WHERE
|
||||
c.del_flag = 1
|
||||
<if test="countyCodes!=null and countyCodes.size() > 0">
|
||||
and a.county_code in <foreach item="countyCode" index="index" collection="countyCodes" open="(" separator=" , " close=")">#{countyCode}</foreach>
|
||||
</if>
|
||||
<if test="name!=null and name!=''">
|
||||
and (a.county_name like concat('%', #{name}, '%') OR b.city_name like concat('%', #{name}, '%') OR c.province_name like concat('%', #{name}, '%'))
|
||||
</if>
|
||||
<if test="countyCode!=null">
|
||||
and (a.county_code =#{countyCode} OR b.city_code = #{countyCode} OR c.province_code = #{countyCode})
|
||||
</if>
|
||||
UNION
|
||||
SELECT
|
||||
b.city_id as areaId,
|
||||
b.province_code AS parentAreaCode,
|
||||
b.city_code AS areaCode,
|
||||
b.city_code_new AS areaCodeNew,
|
||||
b.city_name AS areaName,
|
||||
b.city_remark AS areaRemark,
|
||||
b.create_time,
|
||||
b.create_by,
|
||||
b.create_by_name,
|
||||
b.update_time,
|
||||
b.update_by,
|
||||
b.update_by_name,
|
||||
b.del_flag
|
||||
FROM
|
||||
`sys_county` a
|
||||
LEFT JOIN sys_city b ON a.city_code = b.city_code
|
||||
LEFT JOIN sys_province c ON b.province_code = c.province_code
|
||||
WHERE
|
||||
b.del_flag = 1
|
||||
<if test="countyCodes!=null and countyCodes.size() > 0">
|
||||
and a.county_code in <foreach item="countyCode" index="index" collection="countyCodes" open="(" separator=" , " close=")">#{countyCode}</foreach>
|
||||
</if>
|
||||
<if test="name!=null and name!=''">
|
||||
and (a.county_name like concat('%', #{name}, '%') OR b.city_name like concat('%', #{name}, '%') OR c.province_name like concat('%', #{name}, '%'))
|
||||
</if>
|
||||
<if test="countyCode!=null">
|
||||
and (a.county_code =#{countyCode} OR b.city_code = #{countyCode} OR c.province_code = #{countyCode})
|
||||
</if>
|
||||
UNION
|
||||
SELECT
|
||||
a.county_id as areaId,
|
||||
a.city_code AS parentAreaCode,
|
||||
a.county_code AS areaCode,
|
||||
a.county_code_new AS areaCodeNew,
|
||||
a.county_name AS areaName,
|
||||
a.county_remark AS areaRemark,
|
||||
a.create_time,
|
||||
a.create_by,
|
||||
a.create_by_name,
|
||||
a.update_time,
|
||||
a.update_by,
|
||||
a.update_by_name,
|
||||
a.del_flag
|
||||
FROM
|
||||
`sys_county` a
|
||||
LEFT JOIN sys_city b ON a.city_code = b.city_code
|
||||
LEFT JOIN sys_province c ON b.province_code = c.province_code
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
<if test="countyCodes!=null and countyCodes.size() > 0">
|
||||
and a.county_code in <foreach item="countyCode" index="index" collection="countyCodes" open="(" separator=" , " close=")">#{countyCode}</foreach>
|
||||
</if>
|
||||
<if test="name!=null and name!=''">
|
||||
and (a.county_name like concat('%', #{name}, '%') OR b.city_name like concat('%', #{name}, '%') OR c.province_name like concat('%', #{name}, '%'))
|
||||
</if>
|
||||
<if test="countyCode!=null">
|
||||
and (a.county_code =#{countyCode} OR b.city_code = #{countyCode} OR c.province_code = #{countyCode})
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="findById"
|
||||
parameterType="java.lang.Long"
|
||||
resultType="com.mhd.basic.domain.areaAggregate.entity.SysProvinceEntity">
|
||||
<include refid="selectVo"></include>
|
||||
and a.province_id = #{value}
|
||||
</select>
|
||||
<select id="findByProvinceCode"
|
||||
parameterType="java.lang.Long"
|
||||
resultType="com.mhd.basic.domain.areaAggregate.entity.SysProvinceEntity">
|
||||
<include refid="selectVo"></include>
|
||||
and a.province_code = #{value}
|
||||
</select>
|
||||
|
||||
<select id="findProvinceMaxCode"
|
||||
resultType="com.mhd.basic.domain.areaAggregate.entity.SysProvinceEntity">
|
||||
SELECT
|
||||
province_id,
|
||||
province_code,
|
||||
province_name,
|
||||
province_remark
|
||||
FROM
|
||||
`sys_province`
|
||||
ORDER BY
|
||||
province_code DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="provinceId !=null and provinceId !='' ">
|
||||
and a.province_id = #{provinceId}
|
||||
</if>
|
||||
<if test="provinceCode !=null and provinceCode !='' ">
|
||||
and a.province_code = #{provinceCode}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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.mhd.basic.domain.userConfigSwitch.repository.mapper.UserConfigSwitchMapper">
|
||||
|
||||
|
||||
<sql id="selectUserConfigSwitchPo">
|
||||
select *
|
||||
from user_config_switch a
|
||||
where a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="userConfigSwitchDo.organizationId != null ">
|
||||
and a.organization_id = #{userConfigSwitchDo.organizationId}
|
||||
</if>
|
||||
<if test="userConfigSwitchDo.topOrganizationId != null ">
|
||||
and a.top_organization_id = #{userConfigSwitchDo.topOrganizationId}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.userConfigSwitch.repository.todo.UserConfigSwitchDo" resultType="com.mhd.basic.domain.userConfigSwitch.repository.po.UserConfigSwitchPo">
|
||||
<include refid="selectUserConfigSwitchPo"/>
|
||||
<include refid="common_where"/>
|
||||
</select>
|
||||
|
||||
<select id="getUserConfigSwitchInfo" resultType="com.mhd.basic.domain.userConfigSwitch.repository.po.UserConfigSwitchPo" parameterType="com.mhd.basic.domain.userConfigSwitch.repository.todo.UserConfigSwitchDo">
|
||||
<include refid="selectUserConfigSwitchPo"/>
|
||||
<include refid="common_where"/>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,58 @@
|
||||
<?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.mhd.basic.domain.basicAgreementAggregate.repository.mapper.BasicAgreementMapper">
|
||||
<sql id="selectBasicAgreementVo">
|
||||
SELECT
|
||||
a.*
|
||||
FROM
|
||||
`basic_agreement` a
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectList" parameterType="com.mhd.basic.domain.basicAgreementAggregate.repository.todo.BasicAgreementDO"
|
||||
resultType="com.mhd.basic.domain.basicAgreementAggregate.entity.BasicAgreementEntity">
|
||||
<include refid="selectBasicAgreementVo"></include>
|
||||
<include refid="common_where"></include>
|
||||
</select>
|
||||
|
||||
<select id="findAgreement" parameterType="com.mhd.basic.domain.basicAgreementAggregate.repository.todo.BasicAgreementDO"
|
||||
resultType="com.mhd.basic.domain.basicAgreementAggregate.repository.po.BasicAgreementPO">
|
||||
<include refid="selectBasicAgreementVo"></include>
|
||||
<include refid="common_where"></include>
|
||||
</select>
|
||||
<select id="selectByCode" parameterType="java.lang.String"
|
||||
resultType="com.mhd.basic.domain.basicAgreementAggregate.entity.BasicAgreementEntity">
|
||||
<include refid="selectBasicAgreementVo"></include>
|
||||
and a.basic_agreement_type_code = #{value}
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="basicAgreementDO.basicAgreementTypeCode !=null and basicAgreementDO.basicAgreementTypeCode !='' ">
|
||||
and a.basic_agreement_type_code = #{basicAgreementDO.basicAgreementTypeCode}
|
||||
</if>
|
||||
<if test="basicAgreementDO.basicAgreementStatus !=null and basicAgreementDO.basicAgreementStatus !='' ">
|
||||
and a.basic_agreement_status = #{basicAgreementDO.basicAgreementStatus}
|
||||
</if>
|
||||
<if test="basicAgreementDO.basicAgreementId !=null and basicAgreementDO.basicAgreementId !='' ">
|
||||
and a.basic_agreement_id = #{basicAgreementDO.basicAgreementId}
|
||||
</if>
|
||||
|
||||
<if test="basicAgreementDO.basicAgreementTypeName != null and basicAgreementDO.basicAgreementTypeName != ''">
|
||||
and a.basic_agreement_type_name like concat('%' , #{basicAgreementDO.basicAgreementTypeName} , '%')
|
||||
</if>
|
||||
<if test="basicAgreementDO.organizationName != null and basicAgreementDO.organizationName != ''">
|
||||
and a.organization_name like concat('%' , #{basicAgreementDO.organizationName} , '%')
|
||||
</if>
|
||||
<if test="basicAgreementDO.basicAgreementContent != null and basicAgreementDO.basicAgreementContent != ''">
|
||||
and a.basic_agreement_content like concat('%' , #{basicAgreementDO.basicAgreementContent} , '%')
|
||||
</if>
|
||||
<if test="basicAgreementDO.organizationId !=null">
|
||||
and a.organization_id = #{basicAgreementDO.organizationId}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?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.mhd.basic.domain.userFormConfig.repository.mapper.UserFormConfigMapper">
|
||||
|
||||
<sql id="selectUserFormConfigPo">
|
||||
select
|
||||
*
|
||||
from user_form_config a
|
||||
where a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<sql id="selectUserFormConfigPo1">
|
||||
<if test="userFormConfigDo.organizationId != null ">
|
||||
and organization_id = #{userFormConfigDo.organizationId}
|
||||
</if>
|
||||
<if test="userFormConfigDo.topOrganizationId != null ">
|
||||
and top_organization_id = #{userFormConfigDo.topOrganizationId}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.userFormConfig.entity.UserFormConfig" resultType="com.mhd.basic.domain.userFormConfig.repository.po.UserFormConfigPo">
|
||||
<include refid="selectUserFormConfigPo"/>
|
||||
<include refid="selectUserFormConfigPo1"/>
|
||||
</select>
|
||||
</mapper>
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
<?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.mhd.basic.domain.abnormalAddressBook.repository.mapper.AbnormalAddressBookMapper">
|
||||
|
||||
<resultMap type="com.mhd.basic.domain.abnormalAddressBook.repository.po.AbnormalAddressBookPO" id="AbnormalAddressBookResult">
|
||||
<result property="abnormalAddressBookId" column="abnormal_address_book_id" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="addressSignType" column="address_sign_type" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="transportationId" column="transportation_id" />
|
||||
<result property="transportationNumber" column="transportation_number" />
|
||||
<result property="goodsNumber" column="goods_number" />
|
||||
<result property="actualAreaId" column="actual_area_id" />
|
||||
<result property="actualAreaName" column="actual_area_name" />
|
||||
<result property="originalAddress" column="original_address" />
|
||||
<result property="actualAddress" column="actual_address" />
|
||||
<result property="actualLongitude" column="actual_longitude" />
|
||||
<result property="actualLatitude" column="actual_latitude" />
|
||||
<result property="auditBy" column="audit_by" />
|
||||
<result property="auditByName" column="audit_by_name" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectAbnormalAddressBookPo">
|
||||
select abnormal_address_book_id, top_organization_id, organization_id, organization_name, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag, user_id, address_sign_type, order_id, transportation_id, transportation_number, goods_number, actual_area_id, actual_area_name, original_address, actual_address, actual_longitude, actual_latitude, audit_by, audit_by_name from abnormal_address_book
|
||||
</sql>
|
||||
|
||||
<sql id="selectAbnormalAddressBookPo1">
|
||||
<where>
|
||||
del_flag = 1
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<if test="userId != null ">
|
||||
and user_id = #{userId}
|
||||
</if>
|
||||
<if test="addressSignType != null ">
|
||||
and address_sign_type = #{addressSignType}
|
||||
</if>
|
||||
<if test="orderId != null and orderId != ''">
|
||||
and order_id = #{orderId}
|
||||
</if>
|
||||
<if test="transportationId != null and transportationId != ''">
|
||||
and transportation_id = #{transportationId}
|
||||
</if>
|
||||
<if test="transportationNumber != null and transportationNumber != ''">
|
||||
and transportation_number like concat('%', #{transportationNumber}, '%')
|
||||
</if>
|
||||
<if test="goodsNumber != null and goodsNumber != ''">
|
||||
and goods_number = #{goodsNumber}
|
||||
</if>
|
||||
<if test="actualAreaId != null and actualAreaId != ''">
|
||||
and actual_area_id = #{actualAreaId}
|
||||
</if>
|
||||
<if test="actualAreaName != null and actualAreaName != ''">
|
||||
and actual_area_name like concat('%', #{actualAreaName}, '%')
|
||||
</if>
|
||||
<if test="originalAddress != null and originalAddress != ''">
|
||||
and original_address like concat('%', #{originalAddress}, '%')
|
||||
</if>
|
||||
<if test="actualAddress != null and actualAddress != ''">
|
||||
and actual_address like concat('%', #{actualAddress}, '%')
|
||||
</if>
|
||||
<if test="actualLongitude != null and actualLongitude != ''">
|
||||
and actual_longitude = #{actualLongitude}
|
||||
</if>
|
||||
<if test="actualLatitude != null and actualLatitude != ''">
|
||||
and actual_latitude = #{actualLatitude}
|
||||
</if>
|
||||
<if test="auditBy != null ">
|
||||
and audit_by = #{auditBy}
|
||||
</if>
|
||||
<if test="auditByName != null and auditByName != ''">
|
||||
and audit_by_name like concat('%', #{auditByName}, '%')
|
||||
</if>
|
||||
<!--创建时间-->
|
||||
<if test="startTime != null and endTime != null ">
|
||||
and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[>=]]> DATE_FORMAT(#{startTime},'%Y-%m-%d')
|
||||
and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[<=]]> DATE_FORMAT(#{endTime},'%Y-%m-%d')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.abnormalAddressBook.repository.todo.AbnormalAddressBookDO" resultMap="AbnormalAddressBookResult">
|
||||
<include refid="selectAbnormalAddressBookPo"/>
|
||||
<include refid="selectAbnormalAddressBookPo1"/>
|
||||
order by create_time desc
|
||||
</select>
|
||||
<select id="matchAddressBook"
|
||||
resultType="com.mhd.basic.domain.abnormalAddressBook.repository.po.AbnormalAddressBookPO">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
abnormal_address_book
|
||||
WHERE
|
||||
del_flag = 1
|
||||
AND original_address = #{originalAddress}
|
||||
AND actual_address = #{actualAddress}
|
||||
AND top_organization_id = #{topOrganizationId}
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
<?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.mhd.basic.domain.addressBook.repository.mapper.CommonRouteMapper">
|
||||
|
||||
<sql id="selectCommonRouteVo">
|
||||
select
|
||||
a.*
|
||||
from
|
||||
common_route a
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectCommonRouteList" parameterType="com.mhd.basic.domain.addressBook.todo.CommonRouteDo" resultType="com.mhd.common.core.domain.po.CommonRoutePo">
|
||||
<include refid="selectCommonRouteVo"/>
|
||||
<include refid="common_where"></include>
|
||||
ORDER BY
|
||||
a.create_time DESC
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="commonRouteDo.createBy != null"> and a.create_by = #{commonRouteDo.createBy}</if>
|
||||
<if test="commonRouteDo.synthesize != null and commonRouteDo.synthesize != ''">
|
||||
and (a.mail_name like concat('%', #{commonRouteDo.synthesize}, '%') OR a.mail_phone LIKE concat('%', #{commonRouteDo.synthesize}, '%') OR a.mail_address_plot LIKE concat('%', #{commonRouteDo.synthesize}, '%')
|
||||
OR a.addressee_name like concat('%', #{commonRouteDo.synthesize}, '%') OR a.addressee_phone LIKE concat('%', #{commonRouteDo.synthesize}, '%') OR a.addressee_address_plot LIKE concat('%', #{commonRouteDo.synthesize}, '%'))
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectCommonRouteByCommonRouteId" parameterType="java.lang.Long"
|
||||
resultType="com.mhd.common.core.domain.po.CommonRoutePo">
|
||||
<include refid="selectCommonRouteVo"/>
|
||||
and common_route_id = #{commonRouteId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+344
@@ -0,0 +1,344 @@
|
||||
<?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.mhd.basic.domain.addressBook.repository.mapper.AddressBookMapper">
|
||||
<resultMap type="com.mhd.common.core.domain.po.AddressBookPo" id="AddressBookResult">
|
||||
<result property="addressBookId" column="address_book_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="linkMan" column="link_man" />
|
||||
<result property="linkPhone" column="link_phone" />
|
||||
<result property="provinceCode" column="province_code" />
|
||||
<result property="cityCode" column="city_code" />
|
||||
<result property="countyCode" column="county_code" />
|
||||
<result property="provinceName" column="province_name" />
|
||||
<result property="cityName" column="city_name" />
|
||||
<result property="countyName" column="county_name" />
|
||||
<result property="areaName" column="area_name" />
|
||||
<result property="address" column="address" />
|
||||
<result property="doorplate" column="doorplate" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="defaultStatus" column="default_status" />
|
||||
<result property="longitude" column="longitude" />
|
||||
<result property="latitude" column="latitude" />
|
||||
<result property="addressPlot" column="address_plot" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.mhd.common.core.domain.po.CommonRoutePo" id="CommonRouteResult">
|
||||
<result property="commonRouteId" column="common_route_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="sendAddressId" column="send_address_id" />
|
||||
<result property="sendLinkMan" column="send_link_man" />
|
||||
<result property="sendLinkPhone" column="send_link_phone" />
|
||||
<result property="sendProvinceCode" column="send_province_code" />
|
||||
<result property="sendCityCode" column="send_city_code" />
|
||||
<result property="sendCountyCode" column="send_county_code" />
|
||||
<result property="sendProvinceName" column="send_province_name" />
|
||||
<result property="sendCityName" column="send_city_name" />
|
||||
<result property="sendCountyName" column="send_county_name" />
|
||||
<result property="sendAreaName" column="send_area_name" />
|
||||
<result property="sendAddress" column="send_address" />
|
||||
<result property="sendDoorplate" column="send_doorplate" />
|
||||
<result property="receiveAddressId" column="receive_address_id" />
|
||||
<result property="receiveLinkMan" column="receive_link_man" />
|
||||
<result property="receiveLinkPhone" column="receive_link_phone" />
|
||||
<result property="receiveProvinceCode" column="receive_province_code" />
|
||||
<result property="receiveCityCode" column="receive_city_code" />
|
||||
<result property="receiveCountyCode" column="receive_county_code" />
|
||||
<result property="receiveProvinceName" column="receive_province_name" />
|
||||
<result property="receiveCityName" column="receive_city_name" />
|
||||
<result property="receiveCountyName" column="receive_county_name" />
|
||||
<result property="receiveAreaName" column="receive_area_name" />
|
||||
<result property="receiveAddress" column="receive_address" />
|
||||
<result property="receiveDoorplate" column="receive_doorplate" />
|
||||
<result property="sendLongitude" column="send_longitude" />
|
||||
<result property="sendLatitude" column="send_latitude" />
|
||||
<result property="sendAddressPlot" column="send_addressPlot" />
|
||||
<result property="receiveLongitude" column="receive_longitude" />
|
||||
<result property="receiveLatitude" column="receive_latitude" />
|
||||
<result property="receiveAddressPlot" column="receive_addressPlot" />
|
||||
<result property="defaultStatus" column="default_status" />
|
||||
<result property="throughAddressId" column="through_address_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAddressBookVo">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
address_book
|
||||
</sql>
|
||||
|
||||
<select id="selectCommonRouteList" parameterType="com.mhd.common.core.domain.po.CommonRoutePo" resultMap="CommonRouteResult">
|
||||
SELECT
|
||||
cr.common_route_id,
|
||||
cr.user_id,
|
||||
cr.through_address_id,
|
||||
cr.send_address_id,
|
||||
ab.link_man AS send_link_man,
|
||||
ab.link_phone AS send_link_phone,
|
||||
ab.province_code AS send_province_code,
|
||||
ab.city_code AS send_city_code,
|
||||
ab.county_code AS send_county_code,
|
||||
ab.province_name AS send_province_name,
|
||||
ab.city_name AS send_city_name,
|
||||
ab.county_name AS send_county_name,
|
||||
ab.area_name AS send_area_name,
|
||||
ab.address AS send_address,
|
||||
ab.doorplate AS send_longitude,
|
||||
ab.longitude AS send_latitude,
|
||||
ab.latitude AS send_doorplate,
|
||||
ab.address_plot AS send_addressPlot,
|
||||
cr.receive_address_id,
|
||||
ab1.link_man AS receive_link_man,
|
||||
ab1.link_phone AS receive_link_phone,
|
||||
ab1.province_code AS receive_province_code,
|
||||
ab1.city_code AS receive_city_code,
|
||||
ab1.county_code AS receive_county_code,
|
||||
ab1.province_name AS receive_province_name,
|
||||
ab1.city_name AS receive_city_name,
|
||||
ab1.county_name AS receive_county_name,
|
||||
ab1.area_name AS receive_area_name,
|
||||
ab1.address AS receive_address,
|
||||
ab1.doorplate AS receive_doorplate,
|
||||
ab1.longitude AS receive_latitude,
|
||||
ab1.latitude AS receive_doorplate,
|
||||
ab1.address_plot AS receive_addressPlot
|
||||
FROM
|
||||
`common_route` cr
|
||||
LEFT JOIN
|
||||
address_book ab
|
||||
ON ab.address_book_id = cr.send_address_id and ab.user_id = #{userId}
|
||||
LEFT JOIN
|
||||
address_book ab1
|
||||
ON ab1.address_book_id = cr.receive_address_id and ab1.user_id = #{userId}
|
||||
where
|
||||
cr.user_id = #{userId}
|
||||
<if test="synthesize != null and synthesize != ''">
|
||||
and (ab.link_man like concat('%', #{synthesize}, '%') OR ab.link_phone LIKE concat('%', #{synthesize}, '%') OR ab.area_name LIKE concat('%', #{synthesize}, '%')
|
||||
OR ab1.link_man like concat('%', #{synthesize}, '%') OR ab1.link_phone LIKE concat('%', #{synthesize}, '%') OR ab1.area_name LIKE concat('%', #{synthesize}, '%')
|
||||
<if test="throughAddressIds != null ">
|
||||
<foreach item="id" collection="throughAddressIds" open="OR (" separator="OR" close=")">
|
||||
cr.through_address_id LIKE concat('%', #{id}, ',', '%') or cr.through_address_id LIKE concat('%', ',', #{id}, '%')
|
||||
</foreach>
|
||||
</if>
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectAddressBookList" parameterType="com.mhd.common.core.domain.po.AddressBookPo" resultMap="AddressBookResult">
|
||||
<include refid="selectAddressBookVo"/>
|
||||
<where>
|
||||
del_flag = 1
|
||||
<if test="synthesize != null and synthesize != ''"> and (link_man like concat('%', #{synthesize}, '%') OR link_phone LIKE concat('%', #{synthesize}, '%') OR area_name LIKE concat('%', #{synthesize}, '%') OR address LIKE concat('%', #{synthesize}, '%') OR address_plot LIKE concat('%', #{synthesize}, '%')) </if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="linkMan != null and linkMan != ''"> and link_man = #{linkMan}</if>
|
||||
<if test="linkPhone != null and linkPhone != ''"> and link_phone = #{linkPhone}</if>
|
||||
<if test="provinceCode != null "> and province_code = #{provinceCode}</if>
|
||||
<if test="cityCode != null "> and city_code = #{cityCode}</if>
|
||||
<if test="countyCode != null "> and county_code = #{countyCode}</if>
|
||||
<if test="provinceName != null and provinceName != ''"> and province_name like concat('%', #{provinceName}, '%')</if>
|
||||
<if test="cityName != null and cityName != ''"> and city_name like concat('%', #{cityName}, '%')</if>
|
||||
<if test="countyName != null and countyName != ''"> and county_name like concat('%', #{countyName}, '%')</if>
|
||||
<if test="address != null and address != ''"> and address = #{address}</if>
|
||||
<if test="doorplate != null and doorplate != ''"> and doorplate = #{doorplate}</if>
|
||||
<if test="defaultStatus != null "> and default_status = #{defaultStatus}</if>
|
||||
<if test="createByName != null and createByName != ''"> and create_by_name like concat('%', #{createByName}, '%')</if>
|
||||
<if test="updateByName != null and updateByName != ''"> and update_by_name like concat('%', #{updateByName}, '%')</if>
|
||||
</where>
|
||||
ORDER BY
|
||||
create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectAddressBookListByManifestId" parameterType="java.lang.Long" resultMap="AddressBookResult">
|
||||
SELECT
|
||||
b.address_book_id,
|
||||
b.user_id,
|
||||
b.link_man,
|
||||
b.link_phone,
|
||||
b.province_code,
|
||||
b.city_code,
|
||||
b.county_code,
|
||||
b.province_name,
|
||||
b.city_name,
|
||||
b.county_name,
|
||||
b.area_name,
|
||||
b.address,
|
||||
b.doorplate,
|
||||
b.remark
|
||||
FROM
|
||||
`manifest_throught` m
|
||||
LEFT JOIN
|
||||
address_book b
|
||||
ON m.address_book_id = b.address_book_id
|
||||
WHERE
|
||||
m.manifest_id = #{values}
|
||||
</select>
|
||||
|
||||
<select id="selectAddressBookByAddressBookId" parameterType="java.lang.Long" resultMap="AddressBookResult">
|
||||
<include refid="selectAddressBookVo"/>
|
||||
where address_book_id = #{addressBookId} and del_flag = 1
|
||||
</select>
|
||||
|
||||
<insert id="insertAddressBook" parameterType="com.mhd.basic.domain.addressBook.entity.AddressBook" useGeneratedKeys="true" keyProperty="addressBookId">
|
||||
insert into address_book
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="linkMan != null">link_man,</if>
|
||||
<if test="linkPhone != null">link_phone,</if>
|
||||
<if test="provinceCode != null">province_code,</if>
|
||||
<if test="cityCode != null">city_code,</if>
|
||||
<if test="countyCode != null">county_code,</if>
|
||||
<if test="provinceName != null">province_name,</if>
|
||||
<if test="cityName != null">city_name,</if>
|
||||
<if test="countyName != null">county_name,</if>
|
||||
<if test="areaName != null">area_name,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="doorplate != null">doorplate,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="longitude != null">longitude,</if>
|
||||
<if test="latitude != null">latitude,</if>
|
||||
<if test="addressPlot != null">address_plot,</if>
|
||||
<if test="defaultStatus != null">default_status,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createByName != null">create_by_name,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateByName != null">update_by_name,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="unitName != null">unit_name,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="linkMan != null">#{linkMan},</if>
|
||||
<if test="linkPhone != null">#{linkPhone},</if>
|
||||
<if test="provinceCode != null">#{provinceCode},</if>
|
||||
<if test="cityCode != null">#{cityCode},</if>
|
||||
<if test="countyCode != null">#{countyCode},</if>
|
||||
<if test="provinceName != null">#{provinceName},</if>
|
||||
<if test="cityName != null">#{cityName},</if>
|
||||
<if test="countyName != null">#{countyName},</if>
|
||||
<if test="areaName != null">#{areaName},</if>
|
||||
<if test="address != null">#{address},</if>
|
||||
<if test="doorplate != null">#{doorplate},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="longitude != null">#{longitude},</if>
|
||||
<if test="latitude != null">#{latitude},</if>
|
||||
<if test="addressPlot != null">#{addressPlot},</if>
|
||||
<if test="defaultStatus != null">#{defaultStatus},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createByName != null">#{createByName},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateByName != null">#{updateByName},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="unitName != null">unit_name,</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertCommonRoute" parameterType="com.mhd.basic.domain.addressBook.entity.CommonRoute" useGeneratedKeys="true" keyProperty="addressBookId">
|
||||
insert into common_route
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="sendAddressId != null">send_address_id,</if>
|
||||
<if test="throughAddressId != null">through_address_id,</if>
|
||||
<if test="receiveAddressId != null">receive_address_id,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createByName != null">create_by_name,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateByName != null">update_by_name,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="sendAddressId != null">#{sendAddressId},</if>
|
||||
<if test="throughAddressId != null">#{throughAddressId},</if>
|
||||
<if test="receiveAddressId != null">#{receiveAddressId},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createByName != null">#{createByName},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateByName != null">#{updateByName},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAddressBook" parameterType="com.mhd.basic.domain.addressBook.entity.AddressBook">
|
||||
update address_book
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="linkMan != null">link_man = #{linkMan},</if>
|
||||
<if test="linkPhone != null">link_phone = #{linkPhone},</if>
|
||||
<if test="provinceCode != null">province_code = #{provinceCode},</if>
|
||||
<if test="cityCode != null">city_code = #{cityCode},</if>
|
||||
<if test="countyCode != null">county_code = #{countyCode},</if>
|
||||
<if test="provinceName != null">province_name = #{provinceName},</if>
|
||||
<if test="cityName != null">city_name = #{cityName},</if>
|
||||
<if test="countyName != null">county_name = #{countyName},</if>
|
||||
<if test="areaName != null">area_name = #{areaName},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="doorplate != null">doorplate = #{doorplate},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="longitude != null">longitude = #{longitude},</if>
|
||||
<if test="latitude != null">latitude = #{latitude},</if>
|
||||
<if test="addressPlot != null">address_plot = #{addressPlot},</if>
|
||||
<if test="defaultStatus != null">default_status = #{defaultStatus},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createByName != null">create_by_name = #{createByName},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateByName != null">update_by_name = #{updateByName},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="unitName != null">unit_name = #{unitName},</if>
|
||||
</trim>
|
||||
where address_book_id = #{addressBookId}
|
||||
</update>
|
||||
|
||||
<update id="updateCommonRoute" parameterType="com.mhd.basic.domain.addressBook.entity.CommonRoute">
|
||||
update common_route
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="sendAddressId != null">send_address_id = #{sendAddressId},</if>
|
||||
<if test="throughAddressId != null">through_address_id = #{throughAddressId},</if>
|
||||
<if test="receiveAddressId != null">receive_address_id = #{receiveAddressId},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createByName != null">create_by_name = #{createByName},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateByName != null">update_by_name = #{updateByName},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where common_route_id = #{commonRouteId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAddressBookByAddressBookId" parameterType="java.lang.Long">
|
||||
delete from address_book where address_book_id = #{addressBookId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAddressBookByAddressBookIds" parameterType="java.lang.String">
|
||||
delete from address_book where address_book_id in
|
||||
<foreach item="addressBookId" collection="array" open="(" separator="," close=")">
|
||||
#{addressBookId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
<?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.mhd.basic.domain.associationWarehouse.repository.mapper.AssociationWarehouseMapper">
|
||||
|
||||
<resultMap type="com.mhd.basic.domain.associationWarehouse.repository.po.AssociationWarehousePO" id="AssociationWarehouseResult">
|
||||
<result property="associationWarehouseId" column="association_warehouse_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="correlationId" column="correlation_id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseCode" column="warehouse_code" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectAssociationWarehousePo">
|
||||
a.association_warehouse_id, a.organization_id, a.organization_name, a.top_organization_id,
|
||||
a.correlation_id, a.warehouse_id, a.warehouse_code, a.warehouse_name, a.create_time,
|
||||
a.create_by, a.create_by_name, a.update_time, a.update_by, a.update_by_name, a.del_flag
|
||||
</sql>
|
||||
|
||||
<sql id="selectAssociationWarehousePo1">
|
||||
<if test="organizationId != null ">
|
||||
and a.organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and a.organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and a.top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="correlationId != null ">
|
||||
and a.correlation_id = #{correlationId}
|
||||
</if>
|
||||
<if test="warehouseId != null ">
|
||||
and a.warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="warehouseCode != null and warehouseCode != ''">
|
||||
and a.warehouse_code = #{warehouseCode}
|
||||
</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">
|
||||
and a.warehouse_name like concat('%', #{warehouseName}, '%')
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and a.create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and a.update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<choose>
|
||||
<when test="delFlag != null"> and a.del_flag = #{delFlag} </when>
|
||||
<otherwise> and a.del_flag = 1 </otherwise>
|
||||
</choose>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.associationWarehouse.repository.todo.AssociationWarehouseDO" resultMap="AssociationWarehouseResult">
|
||||
select
|
||||
<include refid="selectAssociationWarehousePo"/>
|
||||
from association_warehouse a
|
||||
<where>
|
||||
<include refid="selectAssociationWarehousePo1"/>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,75 @@
|
||||
<?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.mhd.basic.domain.batch.repository.mapper.BatchMapper">
|
||||
|
||||
<resultMap type="com.mhd.basic.domain.batch.repository.po.BatchPO" id="BatchResult">
|
||||
<result property="batchId" column="batch_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="batchCode" column="batch_code" />
|
||||
<result property="batchName" column="batch_name" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="openingUp" column="opening_up" />
|
||||
<result property="nullify" column="nullify" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectBatchPo">
|
||||
select batch_id, organization_id, organization_name, top_organization_id, batch_code, batch_name, remark, opening_up, nullify, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from batch
|
||||
</sql>
|
||||
|
||||
<sql id="selectBatchPo1">
|
||||
<where>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="batchCode != null and batchCode != ''">
|
||||
and batch_code = #{batchCode}
|
||||
</if>
|
||||
<if test="batchName != null and batchName != ''">
|
||||
and batch_name like concat('%', #{batchName}, '%')
|
||||
</if>
|
||||
<if test="openingUp != null ">
|
||||
and opening_up = #{openingUp}
|
||||
</if>
|
||||
<if test="nullify != null ">
|
||||
and nullify = #{nullify}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
and remark like concat('%', #{remark}, '%')
|
||||
</if>
|
||||
<choose>
|
||||
<when test="delFlag != null"> and del_flag = #{delFlag} </when>
|
||||
<otherwise> and del_flag = 1 </otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.batch.repository.todo.BatchDO" resultMap="BatchResult">
|
||||
<include refid="selectBatchPo"/>
|
||||
<include refid="selectBatchPo1"/>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
<?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.mhd.basic.domain.batchDetail.repository.mapper.BatchDetailMapper">
|
||||
|
||||
<resultMap type="com.mhd.basic.domain.batchDetail.repository.po.BatchDetailPO" id="BatchDetailResult">
|
||||
<result property="batchDetailId" column="batch_detail_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="batchId" column="batch_id" />
|
||||
<result property="batchLabels" column="batch_labels" />
|
||||
<result property="inputControl" column="input_control" />
|
||||
<result property="attributeFormat" column="attribute_format" />
|
||||
<result property="attributeOption" column="attribute_option" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectBatchDetailPo">
|
||||
select batch_detail_id, organization_id, organization_name, top_organization_id, batch_id, batch_labels, input_control, attribute_format, attribute_option, remark, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from batch_detail
|
||||
</sql>
|
||||
|
||||
<sql id="selectBatchDetailPo1">
|
||||
<where>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="batchId != null ">
|
||||
and batch_id = #{batchId}
|
||||
</if>
|
||||
<if test="batchLabels != null and batchLabels != ''">
|
||||
and batch_labels = #{batchLabels}
|
||||
</if>
|
||||
<if test="inputControl != null ">
|
||||
and input_control = #{inputControl}
|
||||
</if>
|
||||
<if test="attributeFormat != null and attributeFormat != ''">
|
||||
and attribute_format = #{attributeFormat}
|
||||
</if>
|
||||
<if test="attributeOption != null and attributeOption != ''">
|
||||
and attribute_option = #{attributeOption}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<choose>
|
||||
<when test="delFlag != null"> and del_flag = #{delFlag} </when>
|
||||
<otherwise> and del_flag = 1 </otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.batchDetail.repository.todo.BatchDetailDO" resultMap="BatchDetailResult">
|
||||
<include refid="selectBatchDetailPo"/>
|
||||
<include refid="selectBatchDetailPo1"/>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?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.mhd.basic.domain.brand.repository.mapper.BrandMapper">
|
||||
|
||||
<resultMap type="com.mhd.basic.domain.brand.repository.po.BrandPO" id="BrandResult">
|
||||
<result property="brandId" column="brand_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="shipperId" column="shipper_id" />
|
||||
<result property="shipperName" column="shipper_name" />
|
||||
<result property="brandCode" column="brand_code" />
|
||||
<result property="brandName" column="brand_name" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="nullify" column="nullify" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectBrandPo">
|
||||
select brand_id, organization_id, organization_name, top_organization_id, shipper_id, shipper_name, brand_code, brand_name, remark, nullify, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from brand
|
||||
</sql>
|
||||
|
||||
<sql id="selectBrandPo1">
|
||||
<where>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="shipperId != null ">
|
||||
and shipper_id = #{shipperId}
|
||||
</if>
|
||||
<if test="shipperName != null and shipperName != ''">
|
||||
and shipper_name like concat('%', #{shipperName}, '%')
|
||||
</if>
|
||||
<if test="brandCode != null and brandCode != ''">
|
||||
and brand_code = #{brandCode}
|
||||
</if>
|
||||
<if test="brandName != null and brandName != ''">
|
||||
and brand_name like concat('%', #{brandName}, '%')
|
||||
</if>
|
||||
<if test="nullify != null ">
|
||||
and nullify = #{nullify}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
and remark like concat('%', #{remark}, '%')
|
||||
</if>
|
||||
<choose>
|
||||
<when test="delFlag != null"> and del_flag = #{delFlag} </when>
|
||||
<otherwise> and del_flag = 1 </otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.brand.repository.todo.BrandDO" resultMap="BrandResult">
|
||||
<include refid="selectBrandPo"/>
|
||||
<include refid="selectBrandPo1"/>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
<?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.mhd.basic.domain.commonLineDriver.repository.mapper.CommonLineDriverMapper">
|
||||
|
||||
<resultMap type="com.mhd.basic.domain.commonLineDriver.repository.po.CommonLineDriverPO" id="CommonLineDriverResult">
|
||||
<result property="commonLineDriverId" column="common_line_driver_id" />
|
||||
<result property="lineName" column="line_name" />
|
||||
<result property="loadingName" column="loading_name" />
|
||||
<result property="loadingAreaId" column="loading_area_id" />
|
||||
<result property="unloadName" column="unload_name" />
|
||||
<result property="unloadAreaId" column="unload_area_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectCommonLineDriverPo">
|
||||
select *
|
||||
from common_line_driver
|
||||
</sql>
|
||||
|
||||
<sql id="selectCommonLineDriverPo1">
|
||||
<where>
|
||||
del_flag = 1
|
||||
<if test="lineName != null and lineName != ''">
|
||||
and line_name like concat('%', #{lineName}, '%')
|
||||
</if>
|
||||
<if test="loadingName != null and loadingName != ''">
|
||||
and loading_name like concat('%', #{loadingName}, '%')
|
||||
</if>
|
||||
<if test="loadingAreaId != null and loadingAreaId != ''">
|
||||
and loading_area_id = #{loadingAreaId}
|
||||
</if>
|
||||
<if test="unloadName != null and unloadName != ''">
|
||||
and unload_name like concat('%', #{unloadName}, '%')
|
||||
</if>
|
||||
<if test="unloadAreaId != null and unloadAreaId != ''">
|
||||
and unload_area_id = #{unloadAreaId}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">
|
||||
and create_by = #{createBy}
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.commonLineDriver.repository.todo.CommonLineDriverDO"
|
||||
resultType="com.mhd.basic.domain.commonLineDriver.repository.po.CommonLineDriverPO">
|
||||
<include refid="selectCommonLineDriverPo"/>
|
||||
<include refid="selectCommonLineDriverPo1"/>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,100 @@
|
||||
<?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.mhd.basic.domain.container.repository.mapper.ContainerMapper">
|
||||
|
||||
<resultMap type="com.mhd.basic.domain.container.repository.po.ContainerPO" id="ContainerResult">
|
||||
<result property="containerId" column="container_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="containerCode" column="container_code" />
|
||||
<result property="containerType" column="container_type" />
|
||||
<result property="containerTypeName" column="container_type_name" />
|
||||
<result property="containerSize" column="container_size" />
|
||||
<result property="containerLength" column="container_length" />
|
||||
<result property="containerWidth" column="container_width" />
|
||||
<result property="containerHeight" column="container_height" />
|
||||
<result property="containerVolume" column="container_volume" />
|
||||
<result property="usageStatus" column="usage_status" />
|
||||
<result property="openingUp" column="opening_up" />
|
||||
<result property="nullify" column="nullify" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectContainerPo">
|
||||
select container_id, organization_id, organization_name, top_organization_id, container_code, container_type, container_type_name, container_size, container_length, container_width, container_height, container_volume, usage_status, opening_up, nullify, remark, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from container
|
||||
</sql>
|
||||
|
||||
<sql id="selectContainerPo1">
|
||||
<where>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="containerCode != null and containerCode != ''">
|
||||
and container_code = #{containerCode}
|
||||
</if>
|
||||
<if test="containerType != null and containerType != ''">
|
||||
and container_type = #{containerType}
|
||||
</if>
|
||||
<if test="containerTypeName != null and containerTypeName != ''">
|
||||
and container_type_name like concat('%', #{containerTypeName}, '%')
|
||||
</if>
|
||||
<if test="containerSize != null and containerSize != ''">
|
||||
and container_size = #{containerSize}
|
||||
</if>
|
||||
<if test="containerLength != null ">
|
||||
and container_length = #{containerLength}
|
||||
</if>
|
||||
<if test="containerWidth != null ">
|
||||
and container_width = #{containerWidth}
|
||||
</if>
|
||||
<if test="containerHeight != null ">
|
||||
and container_height = #{containerHeight}
|
||||
</if>
|
||||
<if test="containerVolume != null ">
|
||||
and container_volume = #{containerVolume}
|
||||
</if>
|
||||
<if test="usageStatus != null ">
|
||||
and usage_status = #{usageStatus}
|
||||
</if>
|
||||
<if test="openingUp != null ">
|
||||
and opening_up = #{openingUp}
|
||||
</if>
|
||||
<if test="nullify != null ">
|
||||
and nullify = #{nullify}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<choose>
|
||||
<when test="delFlag != null"> and del_flag = #{delFlag} </when>
|
||||
<otherwise> and del_flag = 1 </otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.container.repository.todo.ContainerDO" resultMap="ContainerResult">
|
||||
<include refid="selectContainerPo"/>
|
||||
<include refid="selectContainerPo1"/>
|
||||
ORDER BY container_id DESC
|
||||
</select>
|
||||
</mapper>
|
||||
+183
@@ -0,0 +1,183 @@
|
||||
<?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.mhd.basic.domain.materialBaseInfo.repository.mapper.MaterialBaseInfoMapper">
|
||||
|
||||
<resultMap type="com.mhd.basic.domain.materialBaseInfo.repository.po.MaterialBaseInfoPO" id="MaterialBaseInfoResult">
|
||||
<result property="materialBaseInfoId" column="material_base_info_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="shipperId" column="shipper_id" />
|
||||
<result property="shipperName" column="shipper_name" />
|
||||
<result property="materialCode" column="material_code" />
|
||||
<result property="materialName" column="material_name" />
|
||||
<result property="barCode" column="bar_code" />
|
||||
<result property="materialClassifyCode" column="material_classify_code" typeHandler="com.mhd.common.core.handler.ListTypeHandler" />
|
||||
<result property="materialClassifyName" column="material_classify_name" typeHandler="com.mhd.common.core.handler.ListTypeHandler" />
|
||||
<result property="materialType" column="material_type" />
|
||||
<result property="materialTypeName" column="material_type_name" />
|
||||
<result property="packId" column="pack_id" />
|
||||
<result property="packCode" column="pack_code" />
|
||||
<result property="packName" column="pack_name" />
|
||||
<result property="brandId" column="brand_id" />
|
||||
<result property="brandCode" column="brand_code" />
|
||||
<result property="brandName" column="brand_name" />
|
||||
<result property="shelfLife" column="shelf_life" />
|
||||
<result property="weightLimit" column="weight_limit" />
|
||||
<result property="volumeLimit" column="volume_limit" />
|
||||
<result property="materialShape" column="material_shape" />
|
||||
<result property="materialShapeName" column="material_shape_name" />
|
||||
<result property="materialSize" column="material_size" />
|
||||
<result property="materialLength" column="material_length" />
|
||||
<result property="materialWidth" column="material_width" />
|
||||
<result property="materialHeight" column="material_height" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="nullify" column="nullify" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="common" column="common" />
|
||||
<result property="unitName" column="unit_name" />
|
||||
<result column="material_model" property="materialModel" jdbcType="VARCHAR"/>
|
||||
<result column="material_unit" property="materialUnit" jdbcType="VARCHAR"/>
|
||||
<result column="machine_code" property="machineCode" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectMaterialBaseInfoPo">
|
||||
select material_base_info_id, organization_id, organization_name, top_organization_id, shipper_id, shipper_name, material_code, material_name, bar_code, material_classify_code,
|
||||
material_classify_name, material_type, material_type_name, pack_id, pack_code, pack_name, unit_code, unit_name, brand_id, brand_code, brand_name, shelf_life, weight_limit,
|
||||
volume_limit, material_shape, material_shape_name, material_size, material_length, material_width, material_height, remark, nullify, create_time, create_by, create_by_name,
|
||||
update_time, update_by, update_by_name, del_flag, common,material_model,material_unit,machine_code
|
||||
from material_base_info
|
||||
</sql>
|
||||
|
||||
<sql id="selectMaterialBaseInfoPo1">
|
||||
<where>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="shipperId != null ">
|
||||
and shipper_id = #{shipperId}
|
||||
</if>
|
||||
<if test="shipperName != null and shipperName != ''">
|
||||
and shipper_name like concat('%', #{shipperName}, '%')
|
||||
</if>
|
||||
<if test="materialCode != null and materialCode != ''">
|
||||
and material_code = #{materialCode}
|
||||
</if>
|
||||
<if test="materialName != null and materialName != ''">
|
||||
and material_name like concat('%', #{materialName}, '%')
|
||||
</if>
|
||||
<if test="barCode != null and barCode != ''">
|
||||
and bar_code = #{barCode}
|
||||
</if>
|
||||
<if test="materialClassifyCode != null and materialClassifyCode != ''">
|
||||
and material_classify_code = #{materialClassifyCode}
|
||||
</if>
|
||||
<if test="materialClassifyName != null and materialClassifyName != ''">
|
||||
and material_classify_name like concat('%', #{materialClassifyName}, '%')
|
||||
</if>
|
||||
<if test="materialType != null and materialType != ''">
|
||||
and material_type = #{materialType}
|
||||
</if>
|
||||
<if test="materialTypeName != null and materialTypeName != ''">
|
||||
and material_type_name like concat('%', #{materialTypeName}, '%')
|
||||
</if>
|
||||
<if test="unitCode != null and unitCode != ''">
|
||||
and unit_code = #{unitCode}
|
||||
</if>
|
||||
<if test="unitName != null and unitName != ''">
|
||||
and unit_name like concat('%', #{unitName}, '%')
|
||||
</if>
|
||||
<if test="packId != null ">
|
||||
and pack_id = #{packId}
|
||||
</if>
|
||||
<if test="packCode != null and packCode != ''">
|
||||
and pack_code = #{packCode}
|
||||
</if>
|
||||
<if test="packName != null and packName != ''">
|
||||
and pack_name like concat('%', #{packName}, '%')
|
||||
</if>
|
||||
<if test="brandId != null ">
|
||||
and brand_id = #{brandId}
|
||||
</if>
|
||||
<if test="brandCode != null and brandCode != ''">
|
||||
and brand_code = #{brandCode}
|
||||
</if>
|
||||
<if test="brandName != null and brandName != ''">
|
||||
and brand_name like concat('%', #{brandName}, '%')
|
||||
</if>
|
||||
<if test="shelfLife != null ">
|
||||
and shelf_life = #{shelfLife}
|
||||
</if>
|
||||
<if test="weightLimit != null ">
|
||||
and weight_limit = #{weightLimit}
|
||||
</if>
|
||||
<if test="volumeLimit != null ">
|
||||
and volume_limit = #{volumeLimit}
|
||||
</if>
|
||||
<if test="materialShape != null and materialShape != ''">
|
||||
and material_shape = #{materialShape}
|
||||
</if>
|
||||
<if test="materialShapeName != null and materialShapeName != ''">
|
||||
and material_shape_name like concat('%', #{materialShapeName}, '%')
|
||||
</if>
|
||||
<if test="materialSize != null and materialSize != ''">
|
||||
and material_size = #{materialSize}
|
||||
</if>
|
||||
<if test="materialLength != null ">
|
||||
and material_length = #{materialLength}
|
||||
</if>
|
||||
<if test="materialWidth != null ">
|
||||
and material_width = #{materialWidth}
|
||||
</if>
|
||||
<if test="materialHeight != null ">
|
||||
and material_height = #{materialHeight}
|
||||
</if>
|
||||
<if test="nullify != null ">
|
||||
and nullify = #{nullify}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<!-- 传 1:只查公共 , 2:只查自己的 ,3:公共的和自己的 -->
|
||||
<choose>
|
||||
<when test="common != null and (common == 1 or common == 2) "> and common = #{common} </when>
|
||||
<otherwise> and (
|
||||
1 = 1
|
||||
or common = 1 )</otherwise>
|
||||
</choose>
|
||||
<choose>
|
||||
<when test="delFlag != null"> and del_flag = #{delFlag} </when>
|
||||
<otherwise> and del_flag = 1 </otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
and material_base_info_id in (SELECT
|
||||
DISTINCT material_base_info_id
|
||||
FROM `test_szwl_wms`.material_inventory
|
||||
WHERE
|
||||
allocation_quantity > 0
|
||||
AND del_flag = 1)
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.materialBaseInfo.repository.todo.MaterialBaseInfoDO" resultMap="MaterialBaseInfoResult">
|
||||
<include refid="selectMaterialBaseInfoPo"/>
|
||||
<include refid="selectMaterialBaseInfoPo1"/>
|
||||
</select>
|
||||
</mapper>
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
<?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.mhd.basic.domain.materialClassify.repository.mapper.MaterialClassifyMapper">
|
||||
|
||||
<resultMap type="com.mhd.basic.domain.materialClassify.repository.po.MaterialClassifyPO" id="MaterialClassifyResult">
|
||||
<result property="materialClassifyId" column="material_classify_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="code" column="code" />
|
||||
<result property="name" column="name" />
|
||||
<result property="level" column="level" />
|
||||
<result property="parentCode" column="parent_code" />
|
||||
<result property="parentName" column="parent_name" />
|
||||
<result property="codePath" column="code_path" />
|
||||
<result property="namePath" column="name_path" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="nullify" column="nullify" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectMaterialClassifyPo">
|
||||
select material_classify_id, organization_id, organization_name, top_organization_id, code, `name`, `level`, parent_code, parent_name, code_path, name_path, remark, nullify, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from material_classify
|
||||
</sql>
|
||||
|
||||
<sql id="selectMaterialClassifyPo1">
|
||||
<where>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="code != null and code != ''">
|
||||
and code = #{code}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
and `name` like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="level != null ">
|
||||
and `level` = #{level}
|
||||
</if>
|
||||
<if test="parentCode != null and parentCode != ''">
|
||||
and parent_code = #{parentCode}
|
||||
</if>
|
||||
<if test="parentName != null and parentName != ''">
|
||||
and parent_name like concat('%', #{parentName}, '%')
|
||||
</if>
|
||||
<if test="codePath != null and codePath != ''">
|
||||
and code_path = #{codePath}
|
||||
</if>
|
||||
<if test="namePath != null and namePath != ''">
|
||||
and name_path = #{namePath}
|
||||
</if>
|
||||
<if test="nullify != null ">
|
||||
and nullify = #{nullify}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
and remark like concat('%', #{remark}, '%')
|
||||
</if>
|
||||
<choose>
|
||||
<when test="delFlag != null"> and del_flag = #{delFlag} </when>
|
||||
<otherwise> and del_flag = 1 </otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.materialClassify.repository.todo.MaterialClassifyDO" resultMap="MaterialClassifyResult">
|
||||
<include refid="selectMaterialClassifyPo"/>
|
||||
<include refid="selectMaterialClassifyPo1"/>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="queryChildrenListByParentCode" parameterType="java.lang.String" resultMap="MaterialClassifyResult">
|
||||
<include refid="selectMaterialClassifyPo"/>
|
||||
WHERE
|
||||
FIND_IN_SET(#{parentCode}, code_path) > 0
|
||||
ORDER BY `level` ASC
|
||||
</select>
|
||||
</mapper>
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
<?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.mhd.basic.domain.messageManage.repository.mapper.NoticeMessageLoggingMapper">
|
||||
|
||||
<sql id="selectNoticeMessageLoggingVo">
|
||||
select
|
||||
a.*
|
||||
from
|
||||
notice_message_logging a
|
||||
where a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectNoticeMessageLoggingList" parameterType="com.mhd.basic.domain.messageManage.repository.todo.NoticeMessageLoggingDo"
|
||||
resultType="com.mhd.basic.domain.messageManage.repository.po.NoticeMessageLoggingPo">
|
||||
<include refid="selectNoticeMessageLoggingVo"/>
|
||||
<include refid="common_where"></include>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="noticeMessageLoggingDo.noticeMessageType !=null and noticeMessageLoggingDo.noticeMessageType !='' and noticeMessageLoggingDo.noticeMessageType != -1">
|
||||
AND a.notice_message_type = #{noticeMessageLoggingDo.noticeMessageType}
|
||||
</if>
|
||||
<if test="noticeMessageLoggingDo.noticeMessageType !=null and noticeMessageLoggingDo.noticeMessageType == -1">
|
||||
AND a.notice_message_type in ('1', '2', '4', '5')
|
||||
</if>
|
||||
<if test="noticeMessageLoggingDo.noticeMessageTitle != null and noticeMessageLoggingDo.noticeMessageTitle != ''">
|
||||
AND a.notice_message_title like concat('%' , #{noticeMessageLoggingDo.noticeMessageTitle} , '%')
|
||||
</if>
|
||||
<if test="noticeMessageLoggingDo.messageReadStatus !=null and noticeMessageLoggingDo.messageReadStatus !=''">
|
||||
AND a.message_read_status = #{noticeMessageLoggingDo.messageReadStatus}
|
||||
</if>
|
||||
<if test="noticeMessageLoggingDo.updateTimeStart != null and noticeMessageLoggingDo.updateTimeStart != ''">
|
||||
AND date_format(a.update_time,'%Y-%m-%d') >= #{noticeMessageLoggingDo.updateTimeStart}
|
||||
</if>
|
||||
<if test="noticeMessageLoggingDo.updateTimeEnd != null and noticeMessageLoggingDo.updateTimeEnd != ''">
|
||||
AND date_format(a.update_time,'%Y-%m-%d') <![CDATA[<=]]> #{noticeMessageLoggingDo.updateTimeEnd}
|
||||
</if>
|
||||
<if test="noticeMessageLoggingDo.createBy != null">
|
||||
AND a.create_by = #{noticeMessageLoggingDo.createBy}
|
||||
</if>
|
||||
<if test="noticeMessageLoggingDo.organizationIdList != null ">
|
||||
AND a.organization_id in
|
||||
<foreach item="id" collection="noticeMessageLoggingDo.organizationIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 区分PC、APP消息 -->
|
||||
<if test="noticeMessageLoggingDo.noticeMessageType == null and noticeMessageLoggingDo.noticeQueryType != null and noticeMessageLoggingDo.noticeQueryType == '1'.toString()">
|
||||
AND a.notice_message_type in ('1', '2', '4', '5')
|
||||
</if>
|
||||
<if test="noticeMessageLoggingDo.userId != null and noticeMessageLoggingDo.userId != ''">
|
||||
AND a.user_id = #{noticeMessageLoggingDo.userId}
|
||||
</if>
|
||||
<if test="noticeMessageLoggingDo.isApplyBidding != null ">
|
||||
AND a.notice_message_type = '4' AND DATE_FORMAT(a.create_time,'%Y-%m-%d') = DATE_FORMAT(NOW(),'%Y-%m-%d')
|
||||
</if>
|
||||
<if test="noticeMessageLoggingDo.dataSourceSystem != null and noticeMessageLoggingDo.dataSourceSystem == 3 ">
|
||||
AND a.data_source_system = 3
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectNoticeMessageLoggingByNoticeMessageLoggingId" parameterType="java.lang.Long"
|
||||
resultType="com.mhd.basic.domain.messageManage.repository.po.NoticeMessageLoggingPo">
|
||||
<include refid="selectNoticeMessageLoggingVo"/>
|
||||
AND a.notice_message_logging_id = #{noticeMessageLoggingId}
|
||||
</select>
|
||||
|
||||
<select id="getAppNoticeList" resultType="com.mhd.basic.domain.messageManage.repository.po.NoticeMessageLoggingPo" parameterType="com.mhd.basic.domain.messageManage.repository.todo.NoticeMessageLoggingDo">
|
||||
SELECT
|
||||
a.*
|
||||
FROM
|
||||
( SELECT b.* FROM notice_message_logging b ORDER BY b.create_time DESC LIMIT 1000 ) a
|
||||
WHERE
|
||||
a.del_flag = 1
|
||||
AND a.user_id = #{noticeMessageLoggingDo.userId}
|
||||
GROUP BY a.notice_message_type
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
<?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.mhd.basic.domain.messageManage.repository.mapper.NoticeMouldManageMapper">
|
||||
|
||||
<sql id="selectNoticeMouldManageVo">
|
||||
select
|
||||
a.*
|
||||
from notice_mould_manage a
|
||||
where
|
||||
a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectNoticeMouldManageList" parameterType="com.mhd.basic.domain.messageManage.repository.todo.NoticeMouldManageDo"
|
||||
resultType="com.mhd.basic.domain.messageManage.repository.po.NoticeMouldManagePo">
|
||||
<include refid="selectNoticeMouldManageVo"/>
|
||||
<include refid="common_where"></include>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="noticeMouldManageDo.createBy != null">
|
||||
AND a.create_by = #{noticeMouldManageDo.createBy}
|
||||
</if>
|
||||
<if test="noticeMouldManageDo.noticeRoleCode !=null and noticeMouldManageDo.noticeRoleCode !=''">
|
||||
and a.notice_role_code = #{noticeMouldManageDo.noticeRoleCode}
|
||||
</if>
|
||||
<if test="noticeMouldManageDo.noticeTypeCode !=null and noticeMouldManageDo.noticeTypeCode !=''">
|
||||
and a.notice_type_code = #{noticeMouldManageDo.noticeTypeCode}
|
||||
</if>
|
||||
<if test="noticeMouldManageDo.noticeMethod !=null and noticeMouldManageDo.noticeMethod == 1">
|
||||
and a.notice_method_sms = 1
|
||||
</if>
|
||||
<if test="noticeMouldManageDo.noticeMethod !=null and noticeMouldManageDo.noticeMethod == 2">
|
||||
and a.notice_method_wechat = 1
|
||||
</if>
|
||||
<if test="noticeMouldManageDo.noticeMethod !=null and noticeMouldManageDo.noticeMethod == 3">
|
||||
and a.notice_method_app = 1
|
||||
</if>
|
||||
<if test="noticeMouldManageDo.noticeMethod !=null and noticeMouldManageDo.noticeMethod == 4">
|
||||
and a.notice_method_pc = 1
|
||||
</if>
|
||||
<if test="noticeMouldManageDo.organizationIdList != null ">
|
||||
AND a.organization_id in
|
||||
<foreach item="id" collection="noticeMouldManageDo.organizationIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="selectNoticeMouldManageByNoticeMouldManageId" parameterType="java.lang.Long"
|
||||
resultType="com.mhd.basic.domain.messageManage.repository.po.NoticeMouldManagePo">
|
||||
<include refid="selectNoticeMouldManageVo"/>
|
||||
and notice_mould_manage_id = #{noticeMouldManageId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mhd.basic.domain.messageManage.repository.mapper.NoticeAnnouncementMapper">
|
||||
|
||||
<sql id="selectNoticeAnnouncementVo">
|
||||
select
|
||||
*
|
||||
from
|
||||
notice_announcement a
|
||||
where
|
||||
a.del_flag = 1
|
||||
</sql>
|
||||
|
||||
<select id="selectNoticeAnnouncementList" parameterType="com.mhd.basic.domain.messageManage.repository.todo.NoticeAnnouncementDo"
|
||||
resultType="com.mhd.basic.domain.messageManage.repository.po.NoticeAnnouncementPo">
|
||||
<include refid="selectNoticeAnnouncementVo"/>
|
||||
<include refid="common_where"></include>
|
||||
</select>
|
||||
|
||||
<sql id="common_where">
|
||||
<if test="noticeAnnouncementDo.noticeAnnouncementTitle != null and noticeAnnouncementDo.noticeAnnouncementTitle != ''">
|
||||
AND a.notice_announcement_title like concat('%' , #{noticeAnnouncementDo.noticeAnnouncementTitle} , '%')
|
||||
</if>
|
||||
<if test="noticeAnnouncementDo.noticeAnnouncementContent != null and noticeAnnouncementDo.noticeAnnouncementContent != ''">
|
||||
AND a.notice_announcement_content like concat('%' , #{noticeAnnouncementDo.noticeAnnouncementContent} , '%')
|
||||
</if>
|
||||
<if test="noticeAnnouncementDo.createBy != null">
|
||||
AND a.create_by = #{noticeAnnouncementDo.createBy}
|
||||
</if>
|
||||
<if test="noticeAnnouncementDo.organizationIdList != null ">
|
||||
AND a.organization_id in
|
||||
<foreach item="id" collection="noticeAnnouncementDo.organizationIdList" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectNoticeAnnouncementByNoticeAnnouncementId" parameterType="java.lang.Long"
|
||||
resultType="com.mhd.basic.domain.messageManage.repository.po.NoticeAnnouncementPo">
|
||||
<include refid="selectNoticeAnnouncementVo"/>
|
||||
and a.notice_announcement_id = #{noticeAnnouncementId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,83 @@
|
||||
<?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.mhd.basic.domain.pack.repository.mapper.PackMapper">
|
||||
|
||||
<resultMap type="com.mhd.basic.domain.pack.repository.po.PackPO" id="PackResult">
|
||||
<result property="packId" column="pack_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="shipperId" column="shipper_id" />
|
||||
<result property="shipperName" column="shipper_name" />
|
||||
<result property="packCode" column="pack_code" />
|
||||
<result property="packName" column="pack_name" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="openingUp" column="opening_up" />
|
||||
<result property="nullify" column="nullify" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectPackPo">
|
||||
select pack_id, organization_id, organization_name, top_organization_id, shipper_id, shipper_name, pack_code, pack_name, remark, opening_up, nullify, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from pack
|
||||
</sql>
|
||||
|
||||
<sql id="selectPackPo1">
|
||||
<where>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="shipperId != null ">
|
||||
and shipper_id = #{shipperId}
|
||||
</if>
|
||||
<if test="shipperName != null and shipperName != ''">
|
||||
and shipper_name like concat('%', #{shipperName}, '%')
|
||||
</if>
|
||||
<if test="packCode != null and packCode != ''">
|
||||
and pack_code = #{packCode}
|
||||
</if>
|
||||
<if test="packName != null and packName != ''">
|
||||
and pack_name like concat('%', #{packName}, '%')
|
||||
</if>
|
||||
<if test="openingUp != null ">
|
||||
and opening_up = #{openingUp}
|
||||
</if>
|
||||
<if test="nullify != null ">
|
||||
and nullify = #{nullify}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
and remark like concat('%', #{remark}, '%')
|
||||
</if>
|
||||
<choose>
|
||||
<when test="delFlag != null"> and del_flag = #{delFlag} </when>
|
||||
<otherwise> and del_flag = 1 </otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.pack.repository.todo.PackDO" resultMap="PackResult">
|
||||
<include refid="selectPackPo"/>
|
||||
<include refid="selectPackPo1"/>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
<?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.mhd.basic.domain.packDetail.repository.mapper.PackDetailMapper">
|
||||
|
||||
<resultMap type="com.mhd.basic.domain.packDetail.repository.po.PackDetailPO" id="PackDetailResult">
|
||||
<result property="packDetailId" column="pack_detail_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="packId" column="pack_id" />
|
||||
<result property="unitCode" column="unit_code" />
|
||||
<result property="name" column="name" />
|
||||
<result property="number" column="number" />
|
||||
<result property="packMaterial" column="pack_material" />
|
||||
<result property="packSize" column="pack_size" />
|
||||
<result property="length" column="length" />
|
||||
<result property="width" column="width" />
|
||||
<result property="height" column="height" />
|
||||
<result property="volume" column="volume" />
|
||||
<result property="weight" column="weight" />
|
||||
<result property="ti" column="ti" />
|
||||
<result property="hi" column="hi" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectPackDetailPo">
|
||||
select pack_detail_id, organization_id, organization_name, top_organization_id, pack_id, unit_code, name, number, pack_material, pack_size, length, width, height, volume, weight, ti, hi, remark, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from pack_detail
|
||||
</sql>
|
||||
|
||||
<sql id="selectPackDetailPo1">
|
||||
<where>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="packId != null ">
|
||||
and pack_id = #{packId}
|
||||
</if>
|
||||
<if test="unitCode != null and unitCode != ''">
|
||||
and unit_code = #{unitCode}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
and name like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="number != null ">
|
||||
and number = #{number}
|
||||
</if>
|
||||
<if test="packMaterial != null and packMaterial != ''">
|
||||
and pack_material = #{packMaterial}
|
||||
</if>
|
||||
<if test="packSize != null and packSize != ''">
|
||||
and pack_size = #{packSize}
|
||||
</if>
|
||||
<if test="length != null ">
|
||||
and length = #{length}
|
||||
</if>
|
||||
<if test="width != null ">
|
||||
and width = #{width}
|
||||
</if>
|
||||
<if test="height != null ">
|
||||
and height = #{height}
|
||||
</if>
|
||||
<if test="volume != null ">
|
||||
and volume = #{volume}
|
||||
</if>
|
||||
<if test="weight != null ">
|
||||
and weight = #{weight}
|
||||
</if>
|
||||
<if test="ti != null ">
|
||||
and ti = #{ti}
|
||||
</if>
|
||||
<if test="hi != null ">
|
||||
and hi = #{hi}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<choose>
|
||||
<when test="delFlag != null"> and del_flag = #{delFlag} </when>
|
||||
<otherwise> and del_flag = 1 </otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.packDetail.repository.todo.PackDetailDO" resultMap="PackDetailResult">
|
||||
<include refid="selectPackDetailPo"/>
|
||||
<include refid="selectPackDetailPo1"/>
|
||||
order by pack_detail_id asc
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,102 @@
|
||||
<?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.mhd.basic.domain.platform.repository.mapper.PlatformMapper">
|
||||
|
||||
<resultMap type="com.mhd.basic.domain.platform.repository.po.PlatformPO" id="PlatformResult">
|
||||
<result property="platformId" column="platform_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="platformCode" column="platform_code" />
|
||||
<result property="platformName" column="platform_name" />
|
||||
<result property="warehouseIdList" column="warehouse_id_list" />
|
||||
<result property="platformGroupId" column="platform_group_id" />
|
||||
<result property="platformGroupCode" column="platform_group_code" />
|
||||
<result property="platformGroupName" column="platform_group_name" />
|
||||
<result property="platformAttribute" column="platform_attribute" />
|
||||
<result property="usageStatus" column="usage_status" />
|
||||
<result property="openingUp" column="opening_up" />
|
||||
<result property="nullify" column="nullify" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectPlatformPo">
|
||||
select platform_id, organization_id, organization_name, top_organization_id, platform_code, platform_name, warehouse_id_list, warehouse_name_list, platform_group_id, platform_group_code, platform_group_name, platform_attribute, usage_status, opening_up, nullify, remark, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from platform
|
||||
</sql>
|
||||
|
||||
<sql id="selectPlatformPo1">
|
||||
<where>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="platformCode != null and platformCode != ''">
|
||||
and platform_code = #{platformCode}
|
||||
</if>
|
||||
<if test="platformName != null and platformName != ''">
|
||||
and platform_name like concat('%', #{platformName}, '%')
|
||||
</if>
|
||||
<if test="warehouseIdList != null and warehouseIdList != ''">
|
||||
and warehouse_id_list = #{warehouseIdList}
|
||||
</if>
|
||||
<if test="warehouseNameList != null and warehouseNameList != ''">
|
||||
and warehouse_name_list = #{warehouseNameList}
|
||||
</if>
|
||||
<if test="platformGroupId != null ">
|
||||
and platform_group_id = #{platformGroupId}
|
||||
</if>
|
||||
<if test="platformGroupCode != null and platformGroupCode != ''">
|
||||
and platform_group_code = #{platformGroupCode}
|
||||
</if>
|
||||
<if test="platformGroupName != null and platformGroupName != ''">
|
||||
and platform_group_name like concat('%', #{platformGroupName}, '%')
|
||||
</if>
|
||||
<if test="platformAttribute != null ">
|
||||
and platform_attribute = #{platformAttribute}
|
||||
</if>
|
||||
<if test="usageStatus != null ">
|
||||
and usage_status = #{usageStatus}
|
||||
</if>
|
||||
<if test="openingUp != null ">
|
||||
and opening_up = #{openingUp}
|
||||
</if>
|
||||
<if test="nullify != null ">
|
||||
and nullify = #{nullify}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
and remark like concat('%', #{remark}, '%')
|
||||
</if>
|
||||
<choose>
|
||||
<when test="delFlag != null"> and del_flag = #{delFlag} </when>
|
||||
<otherwise> and del_flag = 1 </otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.platform.repository.todo.PlatformDO" resultMap="PlatformResult">
|
||||
<include refid="selectPlatformPo"/>
|
||||
<include refid="selectPlatformPo1"/>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
<?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.mhd.basic.domain.platformGroup.repository.mapper.PlatformGroupMapper">
|
||||
|
||||
<resultMap type="com.mhd.basic.domain.platformGroup.repository.po.PlatformGroupPO" id="PlatformGroupResult">
|
||||
<result property="platformGroupId" column="platform_group_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="platformGroupCode" column="platform_group_code" />
|
||||
<result property="platformGroupName" column="platform_group_name" />
|
||||
<result property="platformNumber" column="platform_number" />
|
||||
<result property="openingUp" column="opening_up" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectPlatformGroupPo">
|
||||
select platform_group_id, organization_id, organization_name, top_organization_id, platform_group_code, platform_group_name, platform_number, opening_up, remark, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from platform_group
|
||||
</sql>
|
||||
|
||||
<sql id="selectPlatformGroupPo1">
|
||||
<where>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="platformGroupCode != null and platformGroupCode != ''">
|
||||
and platform_group_code = #{platformGroupCode}
|
||||
</if>
|
||||
<if test="platformGroupName != null and platformGroupName != ''">
|
||||
and platform_group_name like concat('%', #{platformGroupName}, '%')
|
||||
</if>
|
||||
<if test="platformNumber != null ">
|
||||
and platform_number = #{platformNumber}
|
||||
</if>
|
||||
<if test="openingUp != null ">
|
||||
and opening_up = #{openingUp}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<choose>
|
||||
<when test="delFlag != null"> and del_flag = #{delFlag} </when>
|
||||
<otherwise> and del_flag = 1 </otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.platformGroup.repository.todo.PlatformGroupDO" resultMap="PlatformGroupResult">
|
||||
<include refid="selectPlatformGroupPo"/>
|
||||
<include refid="selectPlatformGroupPo1"/>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<update id="addPlatformNumByPlatformGroupId" parameterType="com.mhd.basic.domain.platformGroup.repository.todo.PlatformGroupDO">
|
||||
UPDATE platform_group
|
||||
SET
|
||||
platform_number = platform_number + #{platformNumber},
|
||||
update_by = #{updateBy},
|
||||
update_by_name = #{updateByName},
|
||||
update_time = now()
|
||||
WHERE
|
||||
platform_group_id = #{platformGroupId}
|
||||
</update>
|
||||
|
||||
<update id="subtractPlatformNumByPlatformGroupId" parameterType="com.mhd.basic.domain.platformGroup.repository.todo.PlatformGroupDO">
|
||||
UPDATE platform_group
|
||||
SET
|
||||
platform_number = platform_number - #{platformNumber},
|
||||
update_by = #{updateBy},
|
||||
update_by_name = #{updateByName},
|
||||
update_time = now()
|
||||
WHERE
|
||||
platform_group_id = #{platformGroupId}
|
||||
</update>
|
||||
|
||||
<update id="batchSubtractPlatformNumByPlatformGroupIds" parameterType="com.mhd.basic.domain.platformGroup.repository.todo.PlatformGroupDO">
|
||||
UPDATE platform_group
|
||||
<set>
|
||||
<trim prefix="platform_number = CASE platform_group_id" suffix="END,">
|
||||
<foreach collection="platformGroupDOList" item="item" index="index">
|
||||
WHEN #{item.platformGroupId} THEN platform_number - #{item.platformNumber}
|
||||
</foreach>
|
||||
</trim>
|
||||
update_by = #{updateBy},
|
||||
update_by_name = #{updateByName},
|
||||
update_time = #{updateTime}
|
||||
</set>
|
||||
WHERE
|
||||
platform_group_id IN
|
||||
<foreach collection="platformGroupDOList" item="item" index="index" open="(" separator="," close=")">
|
||||
#{item.platformGroupId}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
<?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.mhd.basic.domain.platformUseTime.repository.mapper.PlatformUseTimeMapper">
|
||||
|
||||
<resultMap type="com.mhd.basic.domain.platformUseTime.repository.po.PlatformUseTimePO" id="PlatformUseTimeResult">
|
||||
<result property="platformUseTimeId" column="platform_use_time_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="platformId" column="platform_id" />
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="endTime" column="end_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectPlatformUseTimePo">
|
||||
select platform_use_time_id, organization_id, organization_name, top_organization_id, platform_id, start_time, end_time, remark, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from platform_use_time
|
||||
</sql>
|
||||
|
||||
<sql id="selectPlatformUseTimePo1">
|
||||
<where>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="platformId != null ">
|
||||
and platform_id = #{platformId}
|
||||
</if>
|
||||
<if test="startTime != null ">
|
||||
and start_time = #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null ">
|
||||
and end_time = #{endTime}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.platformUseTime.repository.todo.PlatformUseTimeDO" resultMap="PlatformUseTimeResult">
|
||||
<include refid="selectPlatformUseTimePo"/>
|
||||
<include refid="selectPlatformUseTimePo1"/>
|
||||
</select>
|
||||
</mapper>
|
||||
+180
@@ -0,0 +1,180 @@
|
||||
<?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.mhd.basic.domain.storageLocation.repository.mapper.StorageLocationMapper">
|
||||
|
||||
<resultMap type="com.mhd.basic.domain.storageLocation.repository.po.StorageLocationPO" id="StorageLocationResult">
|
||||
<result property="storageLocationId" column="storage_location_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseCode" column="warehouse_code" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="storageSectionId" column="storage_section_id" />
|
||||
<result property="storageCode" column="storage_code" />
|
||||
<result property="storageName" column="storage_name" />
|
||||
<result property="storageLocationCode" column="storage_location_code" />
|
||||
<result property="storageLocationName" column="storage_location_name" />
|
||||
<result property="storageLocationClassify" column="storage_location_classify" />
|
||||
<result property="storageLocationClassifyName" column="storage_location_classify_name" />
|
||||
<result property="storageLocationType" column="storage_location_type" />
|
||||
<result property="storageLocationTypeName" column="storage_location_type_name" />
|
||||
<result property="mixingStrategy" column="mixing_strategy" />
|
||||
<result property="mixingStrategyName" column="mixing_strategy_name" />
|
||||
<result property="storageLocationGroupId" column="storage_location_group_id" />
|
||||
<result property="storageLocationGroupCode" column="storage_location_group_code" />
|
||||
<result property="storageLocationGroupName" column="storage_location_group_name" />
|
||||
<result property="weightLimit" column="weight_limit" />
|
||||
<result property="volumeLimit" column="volume_limit" />
|
||||
<result property="locationSize" column="location_size" />
|
||||
<result property="locationLength" column="location_length" />
|
||||
<result property="locationWidth" column="location_width" />
|
||||
<result property="locationHeight" column="location_height" />
|
||||
<result property="coordinate" column="coordinate" />
|
||||
<result property="coordinateArea" column="coordinate_area" />
|
||||
<result property="coordinateColumn" column="coordinate_column" />
|
||||
<result property="coordinateRow" column="coordinate_row" />
|
||||
<result property="coordinateLayer" column="coordinate_layer" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="openingUp" column="opening_up" />
|
||||
<result property="nullify" column="nullify" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectStorageLocationPo">
|
||||
select storage_location_id, organization_id, organization_name, top_organization_id, warehouse_id, warehouse_code, warehouse_name, storage_section_id, storage_code, storage_name, storage_location_code, storage_location_name, storage_location_classify, storage_location_classify_name, storage_location_type, storage_location_type_name, mixing_strategy, mixing_strategy_name, storage_location_group_id, storage_location_group_code, storage_location_group_name, weight_limit, volume_limit, location_size, location_length, location_width, location_height, coordinate, coordinate_area, coordinate_column, coordinate_row, coordinate_layer, remark, opening_up, nullify, status, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from storage_location
|
||||
</sql>
|
||||
|
||||
<sql id="selectStorageLocationPo1">
|
||||
<where>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="warehouseId != null ">
|
||||
and warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="warehouseCode != null and warehouseCode != ''">
|
||||
and warehouse_code = #{warehouseCode}
|
||||
</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">
|
||||
and warehouse_name like concat('%', #{warehouseName}, '%')
|
||||
</if>
|
||||
<if test="storageSectionId != null ">
|
||||
and storage_section_id = #{storageSectionId}
|
||||
</if>
|
||||
<if test="storageCode != null and storageCode != ''">
|
||||
and storage_code = #{storageCode}
|
||||
</if>
|
||||
<if test="storageName != null and storageName != ''">
|
||||
and storage_name like concat('%', #{storageName}, '%')
|
||||
</if>
|
||||
<if test="storageLocationCode != null and storageLocationCode != ''">
|
||||
and storage_location_code = #{storageLocationCode}
|
||||
</if>
|
||||
<if test="storageLocationName != null and storageLocationName != ''">
|
||||
and storage_location_name like concat('%', #{storageLocationName}, '%')
|
||||
</if>
|
||||
<if test="storageLocationClassify != null and storageLocationClassify != ''">
|
||||
and storage_location_classify = #{storageLocationClassify}
|
||||
</if>
|
||||
<if test="storageLocationClassifyName != null and storageLocationClassifyName != ''">
|
||||
and storage_location_classify_name like concat('%', #{storageLocationClassifyName}, '%')
|
||||
</if>
|
||||
<if test="storageLocationType != null and storageLocationType != ''">
|
||||
and storage_location_type = #{storageLocationType}
|
||||
</if>
|
||||
<if test="storageLocationTypeName != null and storageLocationTypeName != ''">
|
||||
and storage_location_type_name like concat('%', #{storageLocationTypeName}, '%')
|
||||
</if>
|
||||
<if test="mixingStrategy != null and mixingStrategy != ''">
|
||||
and mixing_strategy = #{mixingStrategy}
|
||||
</if>
|
||||
<if test="mixingStrategyName != null and mixingStrategyName != ''">
|
||||
and mixing_strategy_name like concat('%', #{mixingStrategyName}, '%')
|
||||
</if>
|
||||
<if test="storageLocationGroupId != null ">
|
||||
and storage_location_group_id = #{storageLocationGroupId}
|
||||
</if>
|
||||
<if test="storageLocationGroupCode != null and storageLocationGroupCode != ''">
|
||||
and storage_location_group_code = #{storageLocationGroupCode}
|
||||
</if>
|
||||
<if test="storageLocationGroupName != null and storageLocationGroupName != ''">
|
||||
and storage_location_group_name like concat('%', #{storageLocationGroupName}, '%')
|
||||
</if>
|
||||
<if test="weightLimit != null ">
|
||||
and weight_limit = #{weightLimit}
|
||||
</if>
|
||||
<if test="volumeLimit != null ">
|
||||
and volume_limit = #{volumeLimit}
|
||||
</if>
|
||||
<if test="locationSize != null and locationSize != ''">
|
||||
and location_size = #{locationSize}
|
||||
</if>
|
||||
<if test="locationLength != null ">
|
||||
and location_length = #{locationLength}
|
||||
</if>
|
||||
<if test="locationWidth != null ">
|
||||
and location_width = #{locationWidth}
|
||||
</if>
|
||||
<if test="locationHeight != null ">
|
||||
and location_height = #{locationHeight}
|
||||
</if>
|
||||
<if test="coordinate != null and coordinate != ''">
|
||||
and coordinate = #{coordinate}
|
||||
</if>
|
||||
<if test="coordinateArea != null and coordinateArea != ''">
|
||||
and coordinate_area = #{coordinateArea}
|
||||
</if>
|
||||
<if test="coordinateColumn != null and coordinateColumn != ''">
|
||||
and coordinate_column = #{coordinateColumn}
|
||||
</if>
|
||||
<if test="coordinateRow != null and coordinateRow != ''">
|
||||
and coordinate_row = #{coordinateRow}
|
||||
</if>
|
||||
<if test="coordinateLayer != null and coordinateLayer != ''">
|
||||
and coordinate_layer = #{coordinateLayer}
|
||||
</if>
|
||||
<if test="openingUp != null ">
|
||||
and opening_up = #{openingUp}
|
||||
</if>
|
||||
<if test="nullify != null ">
|
||||
and nullify = #{nullify}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
and remark like concat('%',#{remark},'%')
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.storageLocation.repository.todo.StorageLocationDO" resultMap="StorageLocationResult">
|
||||
<include refid="selectStorageLocationPo"/>
|
||||
<include refid="selectStorageLocationPo1"/>
|
||||
</select>
|
||||
|
||||
<select id="getStorageLocationCount" parameterType="com.mhd.basic.domain.storageLocation.repository.todo.StorageLocationDO" resultMap="StorageLocationResult">
|
||||
SELECT count(1)
|
||||
from storage_locationfrom
|
||||
<include refid="selectStorageLocationPo1"/>
|
||||
</select>
|
||||
</mapper>
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
<?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.mhd.basic.domain.storageLocationGroup.repository.mapper.StorageLocationGroupMapper">
|
||||
|
||||
<resultMap type="com.mhd.basic.domain.storageLocationGroup.repository.po.StorageLocationGroupPO" id="StorageLocationGroupResult">
|
||||
<result property="storageLocationGroupId" column="storage_location_group_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseCode" column="warehouse_code" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="storageSectionId" column="storage_section_id" />
|
||||
<result property="storageCode" column="storage_code" />
|
||||
<result property="storageName" column="storage_name" />
|
||||
<result property="storageLocationGroupCode" column="storage_location_group_code" />
|
||||
<result property="storageLocationGroupName" column="storage_location_group_name" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="openingUp" column="opening_up" />
|
||||
<result property="nullify" column="nullify" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectStorageLocationGroupPo">
|
||||
select storage_location_group_id, organization_id, organization_name, top_organization_id, warehouse_id, warehouse_code, warehouse_name, storage_section_id, storage_code, storage_name, storage_location_group_code, storage_location_group_name, remark, number, opening_up, nullify, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from storage_location_group
|
||||
</sql>
|
||||
|
||||
<sql id="selectStorageLocationGroupPo1">
|
||||
<where>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="warehouseId != null ">
|
||||
and warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="warehouseCode != null and warehouseCode != ''">
|
||||
and warehouse_code = #{warehouseCode}
|
||||
</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">
|
||||
and warehouse_name like concat('%', #{warehouseName}, '%')
|
||||
</if>
|
||||
<if test="storageSectionId != null ">
|
||||
and storage_section_id = #{storageSectionId}
|
||||
</if>
|
||||
<if test="storageCode != null and storageCode != ''">
|
||||
and storage_code = #{storageCode}
|
||||
</if>
|
||||
<if test="storageName != null and storageName != ''">
|
||||
and storage_name like concat('%', #{storageName}, '%')
|
||||
</if>
|
||||
<if test="storageLocationGroupCode != null and storageLocationGroupCode != ''">
|
||||
and storage_location_group_code = #{storageLocationGroupCode}
|
||||
</if>
|
||||
<if test="storageLocationGroupName != null and storageLocationGroupName != ''">
|
||||
and storage_location_group_name like concat('%', #{storageLocationGroupName}, '%')
|
||||
</if>
|
||||
<if test="openingUp != null ">
|
||||
and opening_up = #{openingUp}
|
||||
</if>
|
||||
<if test="nullify != null ">
|
||||
and nullify = #{nullify}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<if test="number != null">
|
||||
and `number` = #{number}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
and remark like concat('%',#{remark},'%')
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.storageLocationGroup.repository.todo.StorageLocationGroupDO" resultMap="StorageLocationGroupResult">
|
||||
<include refid="selectStorageLocationGroupPo"/>
|
||||
<include refid="selectStorageLocationGroupPo1"/>
|
||||
</select>
|
||||
</mapper>
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
<?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.mhd.basic.domain.storageSection.repository.mapper.StorageSectionMapper">
|
||||
|
||||
<resultMap type="com.mhd.basic.domain.storageSection.repository.po.StorageSectionPO" id="StorageSectionResult">
|
||||
<result property="storageSectionId" column="storage_section_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="warehouseCode" column="warehouse_code" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="storageCode" column="storage_code" />
|
||||
<result property="storageName" column="storage_name" />
|
||||
<result property="storageType" column="storage_type" />
|
||||
<result property="storageTypeName" column="storage_type_name" />
|
||||
<result property="storageRegion" column="storage_region" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="openingUp" column="opening_up" />
|
||||
<result property="nullify" column="nullify" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectStorageSectionPo">
|
||||
select storage_section_id, organization_id, organization_name, top_organization_id, warehouse_id, warehouse_code, warehouse_name, storage_code, storage_name, storage_type, storage_type_name, storage_region, remark, opening_up, nullify, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from storage_section
|
||||
</sql>
|
||||
|
||||
<sql id="selectStorageSectionPo1">
|
||||
<where>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="warehouseId != null ">
|
||||
and warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="warehouseCode != null and warehouseCode != ''">
|
||||
and warehouse_code = #{warehouseCode}
|
||||
</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">
|
||||
and warehouse_name like concat('%', #{warehouseName}, '%')
|
||||
</if>
|
||||
<if test="storageCode != null and storageCode != ''">
|
||||
and storage_code = #{storageCode}
|
||||
</if>
|
||||
<if test="storageName != null and storageName != ''">
|
||||
and storage_name like concat('%', #{storageName}, '%')
|
||||
</if>
|
||||
<if test="storageType != null and storageType != ''">
|
||||
and storage_type = #{storageType}
|
||||
</if>
|
||||
<if test="storageTypeName != null and storageTypeName != ''">
|
||||
and storage_type_name like concat('%', #{storageTypeName}, '%')
|
||||
</if>
|
||||
<if test="storageRegion != null ">
|
||||
and storage_region = #{storageRegion}
|
||||
</if>
|
||||
<if test="openingUp != null ">
|
||||
and opening_up = #{openingUp}
|
||||
</if>
|
||||
<if test="nullify != null ">
|
||||
and nullify = #{nullify}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
and remark like concat('%',#{remark},'%')
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.storageSection.repository.todo.StorageSectionDO" resultMap="StorageSectionResult">
|
||||
<include refid="selectStorageSectionPo"/>
|
||||
<include refid="selectStorageSectionPo1"/>
|
||||
</select>
|
||||
</mapper>
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
<?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.mhd.basic.domain.thirdPartyServiceReqLog.repository.mapper.ThirdPartyServiceReqLogMapper">
|
||||
|
||||
<resultMap type="com.mhd.basic.domain.thirdPartyServiceReqLog.repository.po.ThirdPartyServiceReqLogPO" id="ThirdPartyServiceReqLogResult">
|
||||
<result property="thiParSerReqLogId" column="thi_par_ser_req_log_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="waybillSource" column="waybill_source" />
|
||||
<result property="waybillSourceName" column="waybill_source_name" />
|
||||
<result property="orderNumber" column="order_number" />
|
||||
<result property="interfaceCode" column="interface_code" />
|
||||
<result property="interfaceName" column="interface_name" />
|
||||
<result property="operUrl" column="oper_url" />
|
||||
<result property="operParam" column="oper_param" />
|
||||
<result property="jsonResult" column="json_result" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectThirdPartyServiceReqLogPo">
|
||||
select thi_par_ser_req_log_id, organization_id, organization_name, top_organization_id, waybill_source, waybill_source_name,
|
||||
order_number, interface_code, interface_name, oper_url, status, create_time, create_by, create_by_name,
|
||||
update_time, update_by, update_by_name, del_flag
|
||||
from third_party_service_req_log
|
||||
</sql>
|
||||
|
||||
<sql id="selectThirdPartyServiceReqLogPo1">
|
||||
<where>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="waybillSource != null and waybillSource != ''">
|
||||
and waybill_source = #{waybillSource}
|
||||
</if>
|
||||
<if test="waybillSourceName != null and waybillSourceName != ''">
|
||||
and waybill_source_name like concat('%', #{waybillSourceName}, '%')
|
||||
</if>
|
||||
<if test="orderNumber != null and orderNumber != ''">
|
||||
and order_number = #{orderNumber}
|
||||
</if>
|
||||
<if test="interfaceCode != null and interfaceCode != ''">
|
||||
and interface_code = #{interfaceCode}
|
||||
</if>
|
||||
<if test="interfaceName != null and interfaceName != ''">
|
||||
and interface_name like concat('%', #{interfaceName}, '%')
|
||||
</if>
|
||||
<if test="operUrl != null and operUrl != ''">
|
||||
and oper_url = #{operUrl}
|
||||
</if>
|
||||
<if test="status != null ">
|
||||
and status = #{status}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.thirdPartyServiceReqLog.repository.todo.ThirdPartyServiceReqLogDO" resultMap="ThirdPartyServiceReqLogResult">
|
||||
<include refid="selectThirdPartyServiceReqLogPo"/>
|
||||
<include refid="selectThirdPartyServiceReqLogPo1"/>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,143 @@
|
||||
<?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.mhd.basic.domain.warehouse.repository.mapper.WarehouseMapper">
|
||||
|
||||
<resultMap type="com.mhd.basic.domain.warehouse.repository.po.WarehousePO" id="WarehouseResult">
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
<result property="warehouseCode" column="warehouse_code" />
|
||||
<result property="warehouseName" column="warehouse_name" />
|
||||
<result property="warehouseType" column="warehouse_type" />
|
||||
<result property="warehouseTypeName" column="warehouse_type_name" />
|
||||
<result property="warehouseStructure" column="warehouse_structure" />
|
||||
<result property="warehouseNature" column="warehouse_nature" />
|
||||
<result property="warmLayerCode" column="warm_layer_code" />
|
||||
<result property="warmLayerName" column="warm_layer_name" />
|
||||
<result property="directorName" column="director_name" />
|
||||
<result property="directorPhone" column="director_phone" />
|
||||
<result property="regionCode" column="region_code" />
|
||||
<result property="regionName" column="region_name" />
|
||||
<result property="detailAddress" column="detail_address" />
|
||||
<result property="longitude" column="longitude" />
|
||||
<result property="latitude" column="latitude" />
|
||||
<result property="buildingRegion" column="building_region" />
|
||||
<result property="usageRegion" column="usage_region" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="openingUp" column="opening_up" />
|
||||
<result property="nullify" column="nullify" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createByName" column="create_by_name" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateByName" column="update_by_name" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectWarehousePo">
|
||||
select warehouse_id, organization_id, organization_name, top_organization_id, warehouse_code, warehouse_name, warehouse_type, warehouse_type_name, warehouse_structure, warehouse_nature, warm_layer_code, warm_layer_name, director_name, director_phone, region_code, region_name, detail_address, longitude, latitude, building_region, usage_region, remark, opening_up, nullify, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from warehouse
|
||||
</sql>
|
||||
|
||||
<sql id="selectWarehousePo1">
|
||||
<where>
|
||||
<if test="warehouseId != null ">
|
||||
and warehouse_id = #{warehouseId}
|
||||
</if>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
and organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="warehouseCode != null and warehouseCode != ''">
|
||||
and warehouse_code = #{warehouseCode}
|
||||
</if>
|
||||
<if test="warehouseName != null and warehouseName != ''">
|
||||
and warehouse_name like concat('%', #{warehouseName}, '%')
|
||||
</if>
|
||||
<if test="warehouseType != null and warehouseType != ''">
|
||||
and warehouse_type = #{warehouseType}
|
||||
</if>
|
||||
<if test="warehouseTypeName != null and warehouseTypeName != ''">
|
||||
and warehouse_type_name like concat('%', #{warehouseTypeName}, '%')
|
||||
</if>
|
||||
<if test="warehouseStructure != null ">
|
||||
and warehouse_structure = #{warehouseStructure}
|
||||
</if>
|
||||
<if test="warehouseNature != null ">
|
||||
and warehouse_nature = #{warehouseNature}
|
||||
</if>
|
||||
<if test="warmLayerCode != null and warmLayerCode != ''">
|
||||
and warm_layer_code = #{warmLayerCode}
|
||||
</if>
|
||||
<if test="warmLayerName != null and warmLayerName != ''">
|
||||
and warm_layer_name like concat('%', #{warmLayerName}, '%')
|
||||
</if>
|
||||
<if test="directorName != null and directorName != ''">
|
||||
and director_name like concat('%', #{directorName}, '%')
|
||||
</if>
|
||||
<if test="directorPhone != null and directorPhone != ''">
|
||||
and director_phone = #{directorPhone}
|
||||
</if>
|
||||
<if test="regionCode != null and regionCode != ''">
|
||||
and region_code = #{regionCode}
|
||||
</if>
|
||||
<if test="regionName != null and regionName != ''">
|
||||
and region_name like concat('%', #{regionName}, '%')
|
||||
</if>
|
||||
<if test="detailAddress != null and detailAddress != ''">
|
||||
and detail_address = #{detailAddress}
|
||||
</if>
|
||||
<if test="longitude != null and longitude != ''">
|
||||
and longitude = #{longitude}
|
||||
</if>
|
||||
<if test="latitude != null and latitude != ''">
|
||||
and latitude = #{latitude}
|
||||
</if>
|
||||
<if test="buildingRegion != null ">
|
||||
and building_region = #{buildingRegion}
|
||||
</if>
|
||||
<if test="usageRegion != null ">
|
||||
and usage_region = #{usageRegion}
|
||||
</if>
|
||||
<if test="openingUp != null ">
|
||||
and opening_up = #{openingUp}
|
||||
</if>
|
||||
<if test="nullify != null ">
|
||||
and nullify = #{nullify}
|
||||
</if>
|
||||
<if test="createByName != null and createByName != ''">
|
||||
and create_by_name like concat('%', #{createByName}, '%')
|
||||
</if>
|
||||
<if test="updateByName != null and updateByName != ''">
|
||||
and update_by_name like concat('%', #{updateByName}, '%')
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
and remark like concat('%',#{remark},'%')
|
||||
</if>
|
||||
<if test="warehouseIds != null and warehouseIds.size > 0 ">
|
||||
and warehouse_id in
|
||||
<foreach collection="warehouseIds" item="item" index="index" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<choose>
|
||||
<when test="delFlag != null"> and del_flag = #{delFlag} </when>
|
||||
<otherwise> and del_flag = 1 </otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.basic.domain.warehouse.repository.todo.WarehouseDO" resultMap="WarehouseResult">
|
||||
<include refid="selectWarehousePo"/>
|
||||
<include refid="selectWarehousePo1"/>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,117 @@
|
||||
<?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.mhd.system.mapper.SysAccountingRulesMapper">
|
||||
|
||||
<resultMap type="com.mhd.system.domain.vo.SysAccountingRulesVO" id="SysAccountingRulesResult">
|
||||
<result property="accountingId" column="accounting_id"/>
|
||||
<result property="accountingName" column="accounting_name"/>
|
||||
<result property="unitPrice" column="unit_price"/>
|
||||
<result property="unit" column="unit"/>
|
||||
<result property="money" column="money"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="productId" column="product_id"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysAccountingRulesVo">
|
||||
SELECT
|
||||
a.accounting_id,
|
||||
a.accounting_name,
|
||||
a.unit_price,
|
||||
a.unit,
|
||||
a.money,
|
||||
a.product_id,
|
||||
a.remark,
|
||||
a.del_flag,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
b.product_name productName
|
||||
FROM
|
||||
sys_accounting_rules a
|
||||
LEFT JOIN sys_product b on a.product_id = b.product_id
|
||||
</sql>
|
||||
|
||||
<select id="selectSysAccountingRulesList" parameterType="com.mhd.system.domain.dto.SysAccountingRulesDTO"
|
||||
resultMap="SysAccountingRulesResult">
|
||||
<include refid="selectSysAccountingRulesVo"/>
|
||||
WHERE
|
||||
a.del_flag = 0
|
||||
<if test="accountingName != null and accountingName != ''">and a.accounting_name like concat('%' , #{accountingName} , '%')
|
||||
</if>
|
||||
<if test="productId != null">and b.product_id = #{productId}</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectSysAccountingRulesByAccountingId" parameterType="Long" resultMap="SysAccountingRulesResult">
|
||||
<include refid="selectSysAccountingRulesVo"/>
|
||||
where accounting_id = #{accountingId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysAccountingRules" parameterType="com.mhd.system.domain.dto.SysAccountingRulesDTO"
|
||||
useGeneratedKeys="true" keyProperty="accountingId">
|
||||
insert into sys_accounting_rules
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="accountingName != null and accountingName != ''">accounting_name,</if>
|
||||
<if test="unitPrice != null">unit_price,</if>
|
||||
<if test="unit != null and unit != ''">unit,</if>
|
||||
<if test="money != null">money,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="accountingName != null and accountingName != ''">#{accountingName},</if>
|
||||
<if test="unitPrice != null">#{unitPrice},</if>
|
||||
<if test="unit != null and unit != ''">#{unit},</if>
|
||||
<if test="money != null">#{money},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysAccountingRules" parameterType="SysAccountingRules">
|
||||
update sys_accounting_rules
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="accountingName != null and accountingName != ''">accounting_name = #{accountingName},</if>
|
||||
<if test="unitPrice != null">unit_price = #{unitPrice},</if>
|
||||
<if test="unit != null and unit != ''">unit = #{unit},</if>
|
||||
<if test="money != null">money = #{money},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where accounting_id = #{accountingId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysAccountingRulesByAccountingId" parameterType="Long">
|
||||
update sys_accounting_rules set del_flag = 1 where accounting_id = #{accountingId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysAccountingRulesByAccountingIds" parameterType="String">
|
||||
update sys_accounting_rules set del_flag = 1 where accounting_id in
|
||||
<foreach item="accountingId" collection="array" open="(" separator="," close=")">
|
||||
#{accountingId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,80 @@
|
||||
<?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.mhd.system.mapper.SysCompanyAgreementMapper">
|
||||
|
||||
<resultMap type="SysCompanyAgreement" id="SysCompanyAgreementResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="agreementName" column="agreement_name" />
|
||||
<result property="agreementCont" column="agreement_cont" />
|
||||
<result property="type" column="type" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="statusFlag" column="status_flag" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysCompanyAgreementVo">
|
||||
select id, agreement_name, agreement_cont, type, create_time, status_flag, del_flag from sys_company_agreement
|
||||
</sql>
|
||||
|
||||
<select id="selectSysCompanyAgreementList" parameterType="SysCompanyAgreement" resultMap="SysCompanyAgreementResult">
|
||||
<include refid="selectSysCompanyAgreementVo"/>
|
||||
<where>
|
||||
<if test="agreementName != null and agreementName != ''"> and agreement_name like concat('%', #{agreementName}, '%')</if>
|
||||
<if test="agreementCont != null and agreementCont != ''"> and agreement_cont = #{agreementCont}</if>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="statusFlag != null "> and status_flag = #{statusFlag}</if>
|
||||
and del_flag = 0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysCompanyAgreementById" parameterType="Long" resultMap="SysCompanyAgreementResult">
|
||||
<include refid="selectSysCompanyAgreementVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysCompanyAgreement" parameterType="SysCompanyAgreement" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sys_company_agreement
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="agreementName != null">agreement_name,</if>
|
||||
<if test="agreementCont != null">agreement_cont,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="statusFlag != null">status_flag,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="agreementName != null">#{agreementName},</if>
|
||||
<if test="agreementCont != null">#{agreementCont},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="statusFlag != null">#{statusFlag},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysCompanyAgreement" parameterType="SysCompanyAgreement">
|
||||
update sys_company_agreement
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="agreementName != null">agreement_name = #{agreementName},</if>
|
||||
<if test="agreementCont != null">agreement_cont = #{agreementCont},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="statusFlag != null">status_flag = #{statusFlag},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysCompanyAgreementById" parameterType="Long">
|
||||
delete from sys_company_agreement where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysCompanyAgreementByIds" parameterType="String">
|
||||
delete from sys_company_agreement where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,95 @@
|
||||
<?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.mhd.system.mapper.SysCompanyAppMapper">
|
||||
|
||||
<resultMap type="SysCompanyApp" id="SysCompanyAppResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="appName" column="app_name" />
|
||||
<result property="appDownload" column="app_download" />
|
||||
<result property="banner" column="banner" />
|
||||
<result property="masterColor" column="master_color" />
|
||||
<result property="appVersion" column="app_version" />
|
||||
<result property="createDatetime" column="create_datetime" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="statusFlag" column="status_flag" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysCompanyAppVo">
|
||||
select id, app_name, app_download, banner, master_color, app_version, create_datetime, update_time, status_flag, del_flag from sys_company_app
|
||||
</sql>
|
||||
|
||||
<select id="selectSysCompanyAppList" parameterType="SysCompanyApp" resultMap="SysCompanyAppResult">
|
||||
<include refid="selectSysCompanyAppVo"/>
|
||||
<where>
|
||||
<if test="appName != null and appName != ''"> and app_name like concat('%', #{appName}, '%')</if>
|
||||
<if test="appDownload != null and appDownload != ''"> and app_download = #{appDownload}</if>
|
||||
<if test="banner != null and banner != ''"> and banner = #{banner}</if>
|
||||
<if test="masterColor != null and masterColor != ''"> and master_color = #{masterColor}</if>
|
||||
<if test="appVersion != null and appVersion != ''"> and app_version = #{appVersion}</if>
|
||||
<if test="createDatetime != null "> and create_datetime = #{createDatetime}</if>
|
||||
<if test="statusFlag != null "> and status_flag = #{statusFlag}</if>
|
||||
and del_flag = 0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysCompanyAppById" parameterType="Long" resultMap="SysCompanyAppResult">
|
||||
<include refid="selectSysCompanyAppVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysCompanyApp" parameterType="SysCompanyApp" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sys_company_app
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="appName != null">app_name,</if>
|
||||
<if test="appDownload != null">app_download,</if>
|
||||
<if test="banner != null">banner,</if>
|
||||
<if test="masterColor != null">master_color,</if>
|
||||
<if test="appVersion != null">app_version,</if>
|
||||
<if test="createDatetime != null">create_datetime,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="statusFlag != null">status_flag,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="appName != null">#{appName},</if>
|
||||
<if test="appDownload != null">#{appDownload},</if>
|
||||
<if test="banner != null">#{banner},</if>
|
||||
<if test="masterColor != null">#{masterColor},</if>
|
||||
<if test="appVersion != null">#{appVersion},</if>
|
||||
<if test="createDatetime != null">#{createDatetime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="statusFlag != null">#{statusFlag},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysCompanyApp" parameterType="SysCompanyApp">
|
||||
update sys_company_app
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="appName != null">app_name = #{appName},</if>
|
||||
<if test="appDownload != null">app_download = #{appDownload},</if>
|
||||
<if test="banner != null">banner = #{banner},</if>
|
||||
<if test="masterColor != null">master_color = #{masterColor},</if>
|
||||
<if test="appVersion != null">app_version = #{appVersion},</if>
|
||||
<if test="createDatetime != null">create_datetime = #{createDatetime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="statusFlag != null">status_flag = #{statusFlag},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysCompanyAppById" parameterType="Long">
|
||||
delete from sys_company_app where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysCompanyAppByIds" parameterType="String">
|
||||
delete from sys_company_app where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mhd.system.mapper.SysCompanyBasicsMapper">
|
||||
|
||||
<resultMap type="SysCompanyBasics" id="SysCompanyBasicsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="companyName" column="company_name" />
|
||||
<result property="telphone" column="telphone" />
|
||||
<result property="companyAddress" column="company_address" />
|
||||
<result property="companyHttp" column="company_http" />
|
||||
<result property="companyInfo" column="company_info" />
|
||||
<result property="companyLogo" column="company_logo" />
|
||||
<result property="statusFlag" column="status_flag" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysCompanyBasicsVo">
|
||||
select id, company_name, telphone, company_address, company_http, company_info, company_logo, status_flag, del_flag from sys_company_basics
|
||||
</sql>
|
||||
|
||||
<select id="selectSysCompanyBasicsList" parameterType="SysCompanyBasics" resultMap="SysCompanyBasicsResult">
|
||||
<include refid="selectSysCompanyBasicsVo"/>
|
||||
<where>
|
||||
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
|
||||
<if test="telphone != null and telphone != ''"> and telphone = #{telphone}</if>
|
||||
<if test="companyAddress != null and companyAddress != ''"> and company_address = #{companyAddress}</if>
|
||||
<if test="companyHttp != null and companyHttp != ''"> and company_http = #{companyHttp}</if>
|
||||
<if test="companyInfo != null and companyInfo != ''"> and company_info = #{companyInfo}</if>
|
||||
<if test="companyLogo != null and companyLogo != ''"> and company_logo = #{companyLogo}</if>
|
||||
<if test="statusFlag != null "> and status_flag = #{statusFlag}</if>
|
||||
and del_flag = 0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysCompanyBasicsById" parameterType="Long" resultMap="SysCompanyBasicsResult">
|
||||
<include refid="selectSysCompanyBasicsVo"/>
|
||||
where id = #{id} and del_flag = 0
|
||||
</select>
|
||||
|
||||
<insert id="insertSysCompanyBasics" parameterType="SysCompanyBasics" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sys_company_basics
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="companyName != null">company_name,</if>
|
||||
<if test="telphone != null">telphone,</if>
|
||||
<if test="companyAddress != null">company_address,</if>
|
||||
<if test="companyHttp != null">company_http,</if>
|
||||
<if test="companyInfo != null">company_info,</if>
|
||||
<if test="companyLogo != null">company_logo,</if>
|
||||
<if test="statusFlag != null">status_flag,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="companyName != null">#{companyName},</if>
|
||||
<if test="telphone != null">#{telphone},</if>
|
||||
<if test="companyAddress != null">#{companyAddress},</if>
|
||||
<if test="companyHttp != null">#{companyHttp},</if>
|
||||
<if test="companyInfo != null">#{companyInfo},</if>
|
||||
<if test="companyLogo != null">#{companyLogo},</if>
|
||||
<if test="statusFlag != null">#{statusFlag},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysCompanyBasics" parameterType="SysCompanyBasics">
|
||||
update sys_company_basics
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="companyName != null">company_name = #{companyName},</if>
|
||||
<if test="telphone != null">telphone = #{telphone},</if>
|
||||
<if test="companyAddress != null">company_address = #{companyAddress},</if>
|
||||
<if test="companyHttp != null">company_http = #{companyHttp},</if>
|
||||
<if test="companyInfo != null">company_info = #{companyInfo},</if>
|
||||
<if test="companyLogo != null">company_logo = #{companyLogo},</if>
|
||||
<if test="statusFlag != null">status_flag = #{statusFlag},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteSysCompanyBasicsById" parameterType="Long">
|
||||
update sys_company_basics set del_flag = 1 where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteSysCompanyBasicsByIds" parameterType="String">
|
||||
update sys_company_basics set del_flag = 1 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,157 @@
|
||||
<?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.mhd.system.mapper.SysCompanyMapper">
|
||||
|
||||
<resultMap type="com.mhd.system.domain.SysCompany" id="SysCompanyResult">
|
||||
<result property="companyId" column="company_id" />
|
||||
<result property="parentCompanyId" column="parent_company_id" />
|
||||
<result property="companyName" column="company_name" />
|
||||
<result property="companyAddress" column="company_address" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="isDisable" column="is_disable" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="level" column="level" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysCompanyVo">
|
||||
select a.company_id,
|
||||
a.parent_company_id,
|
||||
a.company_name,
|
||||
a.company_address,
|
||||
a.phone,
|
||||
a.is_disable,
|
||||
a.del_flag,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
a.level,
|
||||
a.user_id,
|
||||
a.user_name
|
||||
from sys_company a
|
||||
</sql>
|
||||
|
||||
<select id="selectSysCompanyList" parameterType="com.mhd.system.domain.SysCompany" resultMap="SysCompanyResult">
|
||||
<include refid="selectSysCompanyVo"/>
|
||||
<where>
|
||||
a.del_flag=0
|
||||
<if test="companyId != null "> and (company_id= #{companyId} or parent_company_id = #{companyId})</if>
|
||||
<if test="parentCompanyId != null "> and parent_company_id = #{parentCompanyId}</if>
|
||||
<if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
|
||||
<if test="companyAddress != null and companyAddress != ''"> and company_address like concat('%', #{companyAddress}, '%')</if>
|
||||
<if test="phone != null and phone != ''"> and phone like concat('%', #{phone}, '%')</if>
|
||||
<if test="isDisable != null "> and is_disable = #{isDisable}</if>
|
||||
</where>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectSysCompanyById" parameterType="java.lang.Long" resultMap="SysCompanyResult">
|
||||
<include refid="selectSysCompanyVo"/>
|
||||
where company_id = #{id} and del_flag=0
|
||||
</select>
|
||||
<select id="selectSysCompanyByUserId" parameterType="java.lang.Long" resultMap="SysCompanyResult">
|
||||
<include refid="selectSysCompanyVo"/>
|
||||
where user_id = #{userId} and del_flag=0
|
||||
</select>
|
||||
<select id="selectSysCompanyByUserName" parameterType="java.lang.String" resultMap="SysCompanyResult">
|
||||
<include refid="selectSysCompanyVo"/>
|
||||
where user_name = #{userName} and del_flag=0
|
||||
</select>
|
||||
|
||||
<insert id="insertSysCompany" parameterType="com.mhd.system.domain.SysCompany" useGeneratedKeys="true" keyProperty="companyId">
|
||||
insert into sys_company
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="parentCompanyId != null">parent_company_id,</if>
|
||||
<if test="companyName != null">company_name,</if>
|
||||
<if test="companyAddress != null">company_address,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="isDisable != null">is_disable,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="userName != null">user_name,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="level != null">level,</if>
|
||||
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="parentCompanyId != null">#{parentCompanyId},</if>
|
||||
<if test="companyName != null">#{companyName},</if>
|
||||
<if test="companyAddress != null">#{companyAddress},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="isDisable != null">#{isDisable},</if>
|
||||
<if test="delFlag != null">#{del_flag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="userName != null">#{userName},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="level != null">#{level},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysCompany" parameterType="com.mhd.system.domain.SysCompany">
|
||||
update sys_company
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="parentCompanyId != null">parent_company_id = #{parentCompanyId},</if>
|
||||
<if test="companyName != null">company_name = #{companyName},</if>
|
||||
<if test="companyAddress != null">company_address = #{companyAddress},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="isDisable != null">is_disable = #{isDisable},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="userName != null">user_name = #{userName},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="level != null">level = #{level},</if>
|
||||
</trim>
|
||||
where company_id = #{companyId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysCompanyById" parameterType="java.lang.Long">
|
||||
update sys_company set del_flag=1 where company_id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysCompanyByIds" parameterType="java.lang.String">
|
||||
update sys_company set del_flag=1 where company_id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectCompanyList" parameterType="com.mhd.system.domain.SysCompany" resultMap="SysCompanyResult">
|
||||
<include refid="selectSysCompanyVo"/>
|
||||
where del_flag = '0'
|
||||
<if test="companyId != null and companyId != 0">
|
||||
AND company_id = #{companyId}
|
||||
</if>
|
||||
<if test="parentCompanyId != null and parentCompanyId != 0">
|
||||
AND parent_company_id = #{parentCompanyId}
|
||||
</if>
|
||||
<if test="companyName != null and companyName != ''">
|
||||
AND company_name like concat('%', #{companyName}, '%')
|
||||
</if>
|
||||
<if test="level != null and level==1">
|
||||
and level in(0)
|
||||
</if>
|
||||
<if test="level != null and level==2">
|
||||
and level in(0,1)
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
order by parent_company_id
|
||||
</select>
|
||||
</mapper>
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
<?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.mhd.system.mapper.SysComplaintfeedbackMapper">
|
||||
|
||||
<resultMap type="com.mhd.system.domain.SysComplaintfeedback" id="SysComplaintfeedbackResult">
|
||||
<result property="feedbackId" column="feedback_id" />
|
||||
<result property="creadBy" column="cread_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="title" column="title" />
|
||||
<result property="messageSource" column="message_source" />
|
||||
<result property="messageStatus" column="message_status" />
|
||||
<result property="replyContent" column="reply_content" />
|
||||
<result property="waybillId" column="waybill_id" />
|
||||
<result property="problemContent" column="problem_content" />
|
||||
<result property="problemScreenshotsAddress" column="problem_screenshots_address" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysComplaintfeedbackVo">
|
||||
select feedback_id, cread_by, create_time, title, message_source, message_status, reply_content, waybill_id, problem_content, problem_screenshots_address from sys_complaintfeedback
|
||||
</sql>
|
||||
|
||||
<select id="selectSysComplaintfeedbackList" parameterType="com.mhd.system.domain.SysComplaintfeedback" resultMap="SysComplaintfeedbackResult">
|
||||
<include refid="selectSysComplaintfeedbackVo"/>
|
||||
where del_flag = 0
|
||||
<if test="creadBy != null and creadBy != ''"> and cread_by = #{creadBy}</if>
|
||||
<if test="messageSource != null "> and message_source = #{messageSource}</if>
|
||||
<if test="messageStatus != null "> and message_status = #{messageStatus}</if>
|
||||
<if test="waybillId != null and waybillId != ''"> and waybill_id = #{waybillId}</if>
|
||||
order by create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectSysComplaintfeedbackByFeedbackId" parameterType="String" resultMap="SysComplaintfeedbackResult">
|
||||
<include refid="selectSysComplaintfeedbackVo"/>
|
||||
where feedback_id in
|
||||
<foreach item="feedbackId" collection="array" open="(" separator="," close=")">
|
||||
feedback_id = #{feedbackId}
|
||||
</foreach> and del_flag = 0
|
||||
</select>
|
||||
|
||||
<insert id="insertSysComplaintfeedback" parameterType="com.mhd.system.domain.SysComplaintfeedback" useGeneratedKeys="true" keyProperty="feedbackId">
|
||||
insert into sys_complaintfeedback
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="creadBy != null">cread_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="title != null">title,</if>
|
||||
<if test="messageSource != null">message_source,</if>
|
||||
<if test="messageStatus != null">message_status,</if>
|
||||
<if test="replyContent != null">reply_content,</if>
|
||||
<if test="waybillId != null">waybill_id,</if>
|
||||
<if test="problemContent != null">problem_content,</if>
|
||||
<if test="problemScreenshotsAddress != null">problem_screenshots_address,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="creadBy != null">#{creadBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="title != null">#{title},</if>
|
||||
<if test="messageSource != null">#{messageSource},</if>
|
||||
<if test="messageStatus != null">#{messageStatus},</if>
|
||||
<if test="replyContent != null">#{replyContent},</if>
|
||||
<if test="waybillId != null">#{waybillId},</if>
|
||||
<if test="problemContent != null">#{problemContent},</if>
|
||||
<if test="problemScreenshotsAddress != null">#{problemScreenshotsAddress},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysComplaintfeedback" parameterType="com.mhd.system.domain.SysComplaintfeedback">
|
||||
update sys_complaintfeedback
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="creadBy != null">cread_by = #{creadBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="title != null">title = #{title},</if>
|
||||
<if test="messageSource != null">message_source = #{messageSource},</if>
|
||||
<if test="messageStatus != null">message_status = 2,</if>
|
||||
<if test="replyContent != null">reply_content = #{replyContent},</if>
|
||||
<if test="waybillId != null">waybill_id = #{waybillId},</if>
|
||||
<if test="problemContent != null">problem_content = #{problemContent},</if>
|
||||
<if test="problemScreenshotsAddress != null">problem_screenshots_address = #{problemScreenshotsAddress},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where feedback_id = #{feedbackId}
|
||||
</update>
|
||||
|
||||
<update id="deleteSysComplaintfeedbackByFeedbackId" parameterType="Long">
|
||||
update sys_complaintfeedback set del_flag = 1
|
||||
</update>
|
||||
|
||||
<update id="deleteSysComplaintfeedbackByFeedbackIds" parameterType="String">
|
||||
update sys_complaintfeedback set del_flag = 1
|
||||
where feedback_id in
|
||||
<foreach item="feedbackId" collection="array" open="(" separator="," close=")">
|
||||
#{feedbackId}
|
||||
</foreach>
|
||||
</update>
|
||||
<update id="updateStatus" parameterType="String">
|
||||
update sys_complaintfeedback set message_status = 1
|
||||
Where feedback_id in
|
||||
<foreach item="feedbackId" collection="array" open="(" separator="," close=")">
|
||||
#{feedbackId}
|
||||
</foreach> and message_status != 2
|
||||
</update>
|
||||
<select id="unReadSum" parameterType="Long">
|
||||
select feedback_id from sys_complaintfeedback where message_status = 0
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,112 @@
|
||||
<?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.mhd.system.mapper.SysConfigMapper">
|
||||
|
||||
<resultMap type="SysConfig" id="SysConfigResult">
|
||||
<id property="configId" column="config_id" />
|
||||
<result property="configName" column="config_name" />
|
||||
<result property="configKey" column="config_key" />
|
||||
<result property="configValue" column="config_value" />
|
||||
<result property="configType" column="config_type" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectConfigVo">
|
||||
select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark
|
||||
from sys_config
|
||||
</sql>
|
||||
|
||||
<!-- 查询条件 -->
|
||||
<sql id="sqlwhereSearch">
|
||||
<where>
|
||||
<if test="configId !=null">
|
||||
and config_id = #{configId}
|
||||
</if>
|
||||
<if test="configKey !=null and configKey != ''">
|
||||
and config_key = #{configKey}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="selectConfig" parameterType="SysConfig" resultMap="SysConfigResult">
|
||||
<include refid="selectConfigVo"/>
|
||||
<include refid="sqlwhereSearch"/>
|
||||
</select>
|
||||
|
||||
<select id="selectConfigList" parameterType="SysConfig" resultMap="SysConfigResult">
|
||||
<include refid="selectConfigVo"/>
|
||||
<where>
|
||||
<if test="configName != null and configName != ''">
|
||||
AND config_name like concat('%', #{configName}, '%')
|
||||
</if>
|
||||
<if test="configType != null and configType != ''">
|
||||
AND config_type = #{configType}
|
||||
</if>
|
||||
<if test="configKey != null and configKey != ''">
|
||||
AND config_key like concat('%', #{configKey}, '%')
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="checkConfigKeyUnique" parameterType="String" resultMap="SysConfigResult">
|
||||
<include refid="selectConfigVo"/>
|
||||
where config_key = #{configKey} limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertConfig" parameterType="SysConfig">
|
||||
insert into sys_config (
|
||||
<if test="configName != null and configName != '' ">config_name,</if>
|
||||
<if test="configKey != null and configKey != '' ">config_key,</if>
|
||||
<if test="configValue != null and configValue != '' ">config_value,</if>
|
||||
<if test="configType != null and configType != '' ">config_type,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="configName != null and configName != ''">#{configName},</if>
|
||||
<if test="configKey != null and configKey != ''">#{configKey},</if>
|
||||
<if test="configValue != null and configValue != ''">#{configValue},</if>
|
||||
<if test="configType != null and configType != ''">#{configType},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateConfig" parameterType="SysConfig">
|
||||
update sys_config
|
||||
<set>
|
||||
<if test="configName != null and configName != ''">config_name = #{configName},</if>
|
||||
<if test="configKey != null and configKey != ''">config_key = #{configKey},</if>
|
||||
<if test="configValue != null and configValue != ''">config_value = #{configValue},</if>
|
||||
<if test="configType != null and configType != ''">config_type = #{configType},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where config_id = #{configId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteConfigById" parameterType="Long">
|
||||
delete from sys_config where config_id = #{configId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteConfigByIds" parameterType="Long">
|
||||
delete from sys_config where config_id in
|
||||
<foreach item="configId" collection="array" open="(" separator="," close=")">
|
||||
#{configId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
<?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.mhd.system.mapper.SysDepartInterfaceInfoMapper">
|
||||
|
||||
<resultMap type="SysDepartInterfaceInfo" id="SysDepartInterfaceInfoResult">
|
||||
<result property="departInfoId" column="depart_info_id" />
|
||||
<result property="interfaceType" column="interface_type" />
|
||||
<result property="interfaceTypeKey" column="interface_type_key" />
|
||||
<result property="interfaceTypeValue" column="interface_type_value" />
|
||||
<result property="interfaceTypeName" column="interface_type_name" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="updateCount" column="update_count" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysDepartInterfaceInfoVo">
|
||||
select depart_info_id, interface_type, interface_type_key, interface_type_value, interface_type_name, create_time, create_by, update_time, update_by, del_flag, update_count from sys_depart_interface_info
|
||||
</sql>
|
||||
|
||||
<select id="selectSysDepartInterfaceInfoList" parameterType="SysDepartInterfaceInfo" resultMap="SysDepartInterfaceInfoResult">
|
||||
<include refid="selectSysDepartInterfaceInfoVo"/>
|
||||
where del_flag = 0
|
||||
<where>
|
||||
<if test="interfaceType != null and interfaceType != ''"> and interface_type = #{interfaceType}</if>
|
||||
<if test="interfaceTypeKey != null and interfaceTypeKey != ''"> and interface_type_key = #{interfaceTypeKey}</if>
|
||||
<if test="interfaceTypeValue != null and interfaceTypeValue != ''"> and interface_type_value = #{interfaceTypeValue}</if>
|
||||
<if test="interfaceTypeName != null and interfaceTypeName != ''"> and interface_type_name like concat('%', #{interfaceTypeName}, '%')</if>
|
||||
<if test="updateCount != null "> and update_count = #{updateCount}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysDepartInterfaceInfoByDepartInfoId" parameterType="Long" resultMap="SysDepartInterfaceInfoResult">
|
||||
<include refid="selectSysDepartInterfaceInfoVo"/>
|
||||
where depart_info_id = #{departInfoId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysDepartInterfaceInfo" parameterType="SysDepartInterfaceInfo" useGeneratedKeys="true" keyProperty="departInfoId">
|
||||
insert into sys_depart_interface_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="interfaceType != null">interface_type,</if>
|
||||
<if test="interfaceTypeKey != null">interface_type_key,</if>
|
||||
<if test="interfaceTypeValue != null">interface_type_value,</if>
|
||||
<if test="interfaceTypeName != null">interface_type_name,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="updateCount != null">update_count,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="interfaceType != null">#{interfaceType},</if>
|
||||
<if test="interfaceTypeKey != null">#{interfaceTypeKey},</if>
|
||||
<if test="interfaceTypeValue != null">#{interfaceTypeValue},</if>
|
||||
<if test="interfaceTypeName != null">#{interfaceTypeName},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="updateCount != null">#{updateCount},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysDepartInterfaceInfo" parameterType="SysDepartInterfaceInfo">
|
||||
update sys_depart_interface_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="interfaceType != null">interface_type = #{interfaceType},</if>
|
||||
<if test="interfaceTypeKey != null">interface_type_key = #{interfaceTypeKey},</if>
|
||||
<if test="interfaceTypeValue != null">interface_type_value = #{interfaceTypeValue},</if>
|
||||
<if test="interfaceTypeName != null">interface_type_name = #{interfaceTypeName},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="updateCount != null">update_count = #{updateCount},</if>
|
||||
</trim>
|
||||
where depart_info_id = #{departInfoId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysDepartInterfaceInfoByDepartInfoId" parameterType="Long">
|
||||
update sys_depart_interface_info set del_flag=1 where depart_info_id = #{departInfoId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysDepartInterfaceInfoByDepartInfoIds" parameterType="String">
|
||||
update sys_depart_interface_info set del_flag=1 where id in
|
||||
<foreach item="departInfoId" collection="array" open="(" separator="," close=")">
|
||||
#{departInfoId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,157 @@
|
||||
<?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.mhd.system.mapper.SysDeptMapper">
|
||||
|
||||
<resultMap type="SysDept" id="SysDeptResult">
|
||||
<id property="deptId" column="dept_id" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="ancestors" column="ancestors" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="orderNum" column="order_num" />
|
||||
<result property="leader" column="leader" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="email" column="email" />
|
||||
<result property="status" column="status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="parentName" column="parent_name" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDeptVo">
|
||||
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time
|
||||
from sys_dept d
|
||||
</sql>
|
||||
|
||||
<select id="selectDeptList" parameterType="SysDept" resultMap="SysDeptResult">
|
||||
<include refid="selectDeptVo"/>
|
||||
where d.del_flag = '0'
|
||||
<if test="deptId != null and deptId != 0">
|
||||
AND dept_id = #{deptId}
|
||||
</if>
|
||||
<if test="parentId != null and parentId != 0">
|
||||
AND parent_id = #{parentId}
|
||||
</if>
|
||||
<if test="deptName != null and deptName != ''">
|
||||
AND dept_name like concat('%', #{deptName}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
order by d.parent_id, d.order_num
|
||||
</select>
|
||||
|
||||
<select id="selectDeptListByRoleId" resultType="Long">
|
||||
select d.dept_id
|
||||
from sys_dept d
|
||||
left join sys_role_dept rd on d.dept_id = rd.dept_id
|
||||
where rd.role_id = #{roleId}
|
||||
<if test="deptCheckStrictly">
|
||||
and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId})
|
||||
</if>
|
||||
order by d.parent_id, d.order_num
|
||||
</select>
|
||||
|
||||
<select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
|
||||
<include refid="selectDeptVo"/>
|
||||
where dept_id = #{deptId}
|
||||
</select>
|
||||
|
||||
<select id="checkDeptExistUser" parameterType="Long" resultType="int">
|
||||
select count(1) from sys_user where dept_id = #{deptId} and del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="hasChildByDeptId" parameterType="Long" resultType="int">
|
||||
select count(1) from sys_dept
|
||||
where del_flag = '0' and parent_id = #{deptId} limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult">
|
||||
select * from sys_dept where find_in_set(#{deptId}, ancestors)
|
||||
</select>
|
||||
|
||||
<select id="selectNormalChildrenDeptById" parameterType="Long" resultType="int">
|
||||
select count(*) from sys_dept where status = 0 and del_flag = '0' and find_in_set(#{deptId}, ancestors)
|
||||
</select>
|
||||
|
||||
<select id="checkDeptNameUnique" resultMap="SysDeptResult">
|
||||
<include refid="selectDeptVo"/>
|
||||
where dept_name=#{deptName} and parent_id = #{parentId} limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertDept" parameterType="SysDept">
|
||||
insert into sys_dept(
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||
<if test="parentId != null and parentId != 0">parent_id,</if>
|
||||
<if test="deptName != null and deptName != ''">dept_name,</if>
|
||||
<if test="ancestors != null and ancestors != ''">ancestors,</if>
|
||||
<if test="orderNum != null">order_num,</if>
|
||||
<if test="leader != null and leader != ''">leader,</if>
|
||||
<if test="phone != null and phone != ''">phone,</if>
|
||||
<if test="email != null and email != ''">email,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="deptId != null and deptId != 0">#{deptId},</if>
|
||||
<if test="parentId != null and parentId != 0">#{parentId},</if>
|
||||
<if test="deptName != null and deptName != ''">#{deptName},</if>
|
||||
<if test="ancestors != null and ancestors != ''">#{ancestors},</if>
|
||||
<if test="orderNum != null">#{orderNum},</if>
|
||||
<if test="leader != null and leader != ''">#{leader},</if>
|
||||
<if test="phone != null and phone != ''">#{phone},</if>
|
||||
<if test="email != null and email != ''">#{email},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateDept" parameterType="SysDept">
|
||||
update sys_dept
|
||||
<set>
|
||||
<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
|
||||
<if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
|
||||
<if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if>
|
||||
<if test="orderNum != null">order_num = #{orderNum},</if>
|
||||
<if test="leader != null">leader = #{leader},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="email != null">email = #{email},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where dept_id = #{deptId}
|
||||
</update>
|
||||
|
||||
<update id="updateDeptChildren" parameterType="java.util.List">
|
||||
update sys_dept set ancestors =
|
||||
<foreach collection="depts" item="item" index="index"
|
||||
separator=" " open="case dept_id" close="end">
|
||||
when #{item.deptId} then #{item.ancestors}
|
||||
</foreach>
|
||||
where dept_id in
|
||||
<foreach collection="depts" item="item" index="index"
|
||||
separator="," open="(" close=")">
|
||||
#{item.deptId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="updateDeptStatusNormal" parameterType="Long">
|
||||
update sys_dept set status = '0' where dept_id in
|
||||
<foreach collection="array" item="deptId" open="(" separator="," close=")">
|
||||
#{deptId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<delete id="deleteDeptById" parameterType="Long">
|
||||
update sys_dept set del_flag = '2' where dept_id = #{deptId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,149 @@
|
||||
<?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.mhd.system.mapper.SysDictDataMapper">
|
||||
|
||||
<resultMap type="SysDictData" id="SysDictDataResult">
|
||||
<id property="dictCode" column="dict_code" />
|
||||
<result property="dictSort" column="dict_sort" />
|
||||
<result property="dictLabel" column="dict_label" />
|
||||
<result property="dictValue" column="dict_value" />
|
||||
<result property="dictType" column="dict_type" />
|
||||
<result property="cssClass" column="css_class" />
|
||||
<result property="listClass" column="list_class" />
|
||||
<result property="isDefault" column="is_default" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="organizationId" column="organization_id" />
|
||||
<result property="organizationName" column="organization_name" />
|
||||
<result property="topOrganizationId" column="top_organization_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDictDataVo">
|
||||
select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark,organization_id,organization_name,top_organization_id
|
||||
from sys_dict_data
|
||||
</sql>
|
||||
|
||||
<select id="selectDictDataList" parameterType="SysDictData" resultMap="SysDictDataResult">
|
||||
<include refid="selectDictDataVo"/>
|
||||
<where>
|
||||
<if test="dictType != null and dictType != ''">
|
||||
AND dict_type = #{dictType}
|
||||
</if>
|
||||
<if test="dictValue != null and dictValue != ''">
|
||||
AND dict_value = #{dictValue}
|
||||
</if>
|
||||
<if test="dictLabel != null and dictLabel != ''">
|
||||
AND dict_label like concat('%', #{dictLabel}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="topOrganizationId != null">
|
||||
AND (top_organization_id = #{topOrganizationId} OR is_default = 'Y')
|
||||
</if>
|
||||
</where>
|
||||
order by dict_sort asc
|
||||
</select>
|
||||
|
||||
<select id="selectDictDataByType" parameterType="SysDictData" resultMap="SysDictDataResult">
|
||||
<include refid="selectDictDataVo"/>
|
||||
<where>
|
||||
status = '0'
|
||||
and dict_type = #{dictType}
|
||||
<if test="topOrganizationId != null">
|
||||
and (top_organization_id = #{topOrganizationId} OR is_default = 'Y')
|
||||
</if>
|
||||
</where>
|
||||
order by dict_sort asc
|
||||
</select>
|
||||
|
||||
<select id="selectDictLabel" resultType="String">
|
||||
select dict_label from sys_dict_data
|
||||
where dict_type = #{dictType} and dict_value = #{dictValue}
|
||||
</select>
|
||||
|
||||
<select id="selectDictDataById" parameterType="Long" resultMap="SysDictDataResult">
|
||||
<include refid="selectDictDataVo"/>
|
||||
where dict_code = #{dictCode}
|
||||
</select>
|
||||
|
||||
<select id="countDictDataByType" resultType="Integer">
|
||||
select count(1) from sys_dict_data where dict_type=#{dictType}
|
||||
</select>
|
||||
|
||||
<delete id="deleteDictDataById" parameterType="Long">
|
||||
delete from sys_dict_data where dict_code = #{dictCode}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDictDataByIds" parameterType="Long">
|
||||
delete from sys_dict_data where dict_code in
|
||||
<foreach collection="array" item="dictCode" open="(" separator="," close=")">
|
||||
#{dictCode}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="updateDictData" parameterType="SysDictData">
|
||||
update sys_dict_data
|
||||
<set>
|
||||
<if test="dictSort != null">dict_sort = #{dictSort},</if>
|
||||
<if test="dictLabel != null and dictLabel != ''">dict_label = #{dictLabel},</if>
|
||||
<if test="dictValue != null and dictValue != ''">dict_value = #{dictValue},</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
|
||||
<if test="cssClass != null">css_class = #{cssClass},</if>
|
||||
<if test="listClass != null">list_class = #{listClass},</if>
|
||||
<if test="isDefault != null and isDefault != ''">is_default = #{isDefault},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="organizationId != null and organizationId != ''">organization_id = #{organizationId},</if>
|
||||
<if test="organizationName != null and organizationName != ''">organization_name = #{organizationName},</if>
|
||||
<if test="topOrganizationId != null and topOrganizationId != ''">top_organization_id = #{topOrganizationId},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where dict_code = #{dictCode}
|
||||
</update>
|
||||
|
||||
<update id="updateDictDataType" parameterType="String">
|
||||
update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
|
||||
</update>
|
||||
|
||||
<insert id="insertDictData" parameterType="SysDictData">
|
||||
insert into sys_dict_data(
|
||||
<if test="dictSort != null">dict_sort,</if>
|
||||
<if test="dictLabel != null and dictLabel != ''">dict_label,</if>
|
||||
<if test="dictValue != null and dictValue != ''">dict_value,</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type,</if>
|
||||
<if test="cssClass != null and cssClass != ''">css_class,</if>
|
||||
<if test="listClass != null and listClass != ''">list_class,</if>
|
||||
<if test="isDefault != null and isDefault != ''">is_default,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="organizationId != null and organizationId != ''">organization_id,</if>
|
||||
<if test="organizationName != null and organizationName != ''">organization_name,</if>
|
||||
<if test="topOrganizationId != null and topOrganizationId != ''">top_organization_id,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="dictSort != null">#{dictSort},</if>
|
||||
<if test="dictLabel != null and dictLabel != ''">#{dictLabel},</if>
|
||||
<if test="dictValue != null and dictValue != ''">#{dictValue},</if>
|
||||
<if test="dictType != null and dictType != ''">#{dictType},</if>
|
||||
<if test="cssClass != null and cssClass != ''">#{cssClass},</if>
|
||||
<if test="listClass != null and listClass != ''">#{listClass},</if>
|
||||
<if test="isDefault != null and isDefault != ''">#{isDefault},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="organizationId != null and organizationId != ''">#{organizationId},</if>
|
||||
<if test="organizationName != null and organizationName != ''">#{organizationName},</if>
|
||||
<if test="topOrganizationId != null and topOrganizationId != ''">#{topOrganizationId},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,105 @@
|
||||
<?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.mhd.system.mapper.SysDictTypeMapper">
|
||||
|
||||
<resultMap type="SysDictType" id="SysDictTypeResult">
|
||||
<id property="dictId" column="dict_id" />
|
||||
<result property="dictName" column="dict_name" />
|
||||
<result property="dictType" column="dict_type" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDictTypeVo">
|
||||
select dict_id, dict_name, dict_type, status, create_by, create_time, remark
|
||||
from sys_dict_type
|
||||
</sql>
|
||||
|
||||
<select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
<where>
|
||||
<if test="dictName != null and dictName != ''">
|
||||
AND dict_name like concat('%', #{dictName}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="dictType != null and dictType != ''">
|
||||
AND dict_type like concat('%', #{dictType}, '%')
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDictTypeAll" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
</select>
|
||||
|
||||
<select id="selectDictTypeById" parameterType="Long" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_id = #{dictId}
|
||||
</select>
|
||||
|
||||
<select id="selectDictTypeByType" parameterType="String" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_type = #{dictType}
|
||||
</select>
|
||||
|
||||
<select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult">
|
||||
<include refid="selectDictTypeVo"/>
|
||||
where dict_type = #{dictType} limit 1
|
||||
</select>
|
||||
|
||||
<delete id="deleteDictTypeById" parameterType="Long">
|
||||
delete from sys_dict_type where dict_id = #{dictId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDictTypeByIds" parameterType="Long">
|
||||
delete from sys_dict_type where dict_id in
|
||||
<foreach collection="array" item="dictId" open="(" separator="," close=")">
|
||||
#{dictId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="updateDictType" parameterType="SysDictType">
|
||||
update sys_dict_type
|
||||
<set>
|
||||
<if test="dictName != null and dictName != ''">dict_name = #{dictName},</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where dict_id = #{dictId}
|
||||
</update>
|
||||
|
||||
<insert id="insertDictType" parameterType="SysDictType">
|
||||
insert into sys_dict_type(
|
||||
<if test="dictName != null and dictName != ''">dict_name,</if>
|
||||
<if test="dictType != null and dictType != ''">dict_type,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="dictName != null and dictName != ''">#{dictName},</if>
|
||||
<if test="dictType != null and dictType != ''">#{dictType},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,105 @@
|
||||
<?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.mhd.system.mapper.SysEquipmentGpsMapper">
|
||||
|
||||
<resultMap type="SysEquipmentGps" id="SysEquipmentGpsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="equipmentName" column="equipment_name" />
|
||||
<result property="productModel" column="product_model" />
|
||||
<result property="productTips" column="product_tips" />
|
||||
<result property="productType" column="product_type" />
|
||||
<result property="statusFlag" column="status_flag" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createDatetime" column="create_datetime" />
|
||||
<result property="updateDatetime" column="update_datetime" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysEquipmentGpsVo">
|
||||
select id, equipment_name, product_model, product_tips, product_type, status_flag, del_flag, create_datetime, update_datetime from sys_equipment_gps
|
||||
</sql>
|
||||
|
||||
<select id="selectSysEquipmentGpsList" parameterType="SysEquipmentGps" resultMap="SysEquipmentGpsResult">
|
||||
<include refid="selectSysEquipmentGpsVo"/>
|
||||
<where>
|
||||
<if test="equipmentName != null and equipmentName != ''"> and equipment_name like concat('%', #{equipmentName}, '%')</if>
|
||||
<if test="productModel != null and productModel != ''"> and product_model = #{productModel}</if>
|
||||
<if test="productTips != null and productTips != ''"> and product_tips = #{productTips}</if>
|
||||
<if test="productType != null and productType != ''"> and product_type = #{productType}</if>
|
||||
<if test="statusFlag != null "> and status_flag = #{statusFlag}</if>
|
||||
<if test="createDatetime != null "> and create_datetime = #{createDatetime}</if>
|
||||
<if test="updateDatetime != null "> and update_datetime = #{updateDatetime}</if>
|
||||
and del_flag = 0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysEquipmentGpsById" parameterType="Long" resultMap="SysEquipmentGpsResult">
|
||||
<include refid="selectSysEquipmentGpsVo"/>
|
||||
where id = #{id} and del_flag = 0
|
||||
</select>
|
||||
|
||||
<insert id="insertSysEquipmentGps" parameterType="SysEquipmentGps">
|
||||
insert into sys_equipment_gps
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="equipmentName != null">equipment_name,</if>
|
||||
<if test="productModel != null">product_model,</if>
|
||||
<if test="productTips != null">product_tips,</if>
|
||||
<if test="productType != null">product_type,</if>
|
||||
<if test="statusFlag != null">status_flag,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createDatetime != null">create_datetime,</if>
|
||||
<if test="updateDatetime != null">update_datetime,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="equipmentName != null">#{equipmentName},</if>
|
||||
<if test="productModel != null">#{productModel},</if>
|
||||
<if test="productTips != null">#{productTips},</if>
|
||||
<if test="productType != null">#{productType},</if>
|
||||
<if test="statusFlag != null">#{statusFlag},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createDatetime != null">#{createDatetime},</if>
|
||||
<if test="updateDatetime != null">#{updateDatetime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysEquipmentGps" parameterType="SysEquipmentGps">
|
||||
update sys_equipment_gps
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="equipmentName != null">equipment_name = #{equipmentName},</if>
|
||||
<if test="productModel != null">product_model = #{productModel},</if>
|
||||
<if test="productTips != null">product_tips = #{productTips},</if>
|
||||
<if test="productType != null">product_type = #{productType},</if>
|
||||
<if test="statusFlag != null">status_flag = #{statusFlag},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createDatetime != null">create_datetime = #{createDatetime},</if>
|
||||
<if test="updateDatetime != null">update_datetime = #{updateDatetime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteSysEquipmentGpsById" parameterType="Long">
|
||||
update sys_equipment_gps set del_flag = 1 where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteSysEquipmentGpsByIds" parameterType="String">
|
||||
update sys_equipment_gps set del_flag where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!--
|
||||
<delete id="deleteSysEquipmentGpsById" parameterType="Long">
|
||||
delete from sys_equipment_gps where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysEquipmentGpsByIds" parameterType="String">
|
||||
delete from sys_equipment_gps where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>-->
|
||||
</mapper>
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
<?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.mhd.system.mapper.SysEquipmentPrinterMapper">
|
||||
|
||||
<resultMap type="SysEquipmentPrinter" id="SysEquipmentPrinterResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="printerName" column="printer_name" />
|
||||
<result property="printerType" column="printer_type" />
|
||||
<result property="printerPid" column="printer_pid" />
|
||||
<result property="company" column="company" />
|
||||
<result property="statusFlag" column="status_flag" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createDate" column="create_date" />
|
||||
<result property="updateDate" column="update_date" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysEquipmentPrinterVo">
|
||||
select id, printer_name, printer_type, printer_pid, company, status_flag, del_flag, create_date, update_date from sys_equipment_printer
|
||||
</sql>
|
||||
|
||||
<select id="selectSysEquipmentPrinterList" parameterType="SysEquipmentPrinter" resultMap="SysEquipmentPrinterResult">
|
||||
<include refid="selectSysEquipmentPrinterVo"/>
|
||||
<where>
|
||||
<if test="printerName != null and printerName != ''"> and printer_name like concat('%', #{printerName}, '%')</if>
|
||||
<if test="printerType != null and printerType != ''"> and printer_type = #{printerType}</if>
|
||||
<if test="printerPid != null and printerPid != ''"> and printer_pid = #{printerPid}</if>
|
||||
<if test="company != null and company != ''"> and company = #{company}</if>
|
||||
<if test="statusFlag != null "> and status_flag = #{statusFlag}</if>
|
||||
<if test="createDate != null "> and create_date = #{createDate}</if>
|
||||
<if test="updateDate != null "> and update_date = #{updateDate}</if>
|
||||
and del_flag = 0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysEquipmentPrinterById" parameterType="Long" resultMap="SysEquipmentPrinterResult">
|
||||
<include refid="selectSysEquipmentPrinterVo"/>
|
||||
where id = #{id} and del_flag = 0
|
||||
</select>
|
||||
|
||||
<insert id="insertSysEquipmentPrinter" parameterType="SysEquipmentPrinter" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sys_equipment_printer
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="printerName != null">printer_name,</if>
|
||||
<if test="printerType != null">printer_type,</if>
|
||||
<if test="printerPid != null">printer_pid,</if>
|
||||
<if test="company != null">company,</if>
|
||||
<if test="statusFlag != null">status_flag,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createDate != null">create_date,</if>
|
||||
<if test="updateDate != null">update_date,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="printerName != null">#{printerName},</if>
|
||||
<if test="printerType != null">#{printerType},</if>
|
||||
<if test="printerPid != null">#{printerPid},</if>
|
||||
<if test="company != null">#{company},</if>
|
||||
<if test="statusFlag != null">#{statusFlag},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createDate != null">#{createDate},</if>
|
||||
<if test="updateDate != null">#{updateDate},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysEquipmentPrinter" parameterType="SysEquipmentPrinter">
|
||||
update sys_equipment_printer
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="printerName != null">printer_name = #{printerName},</if>
|
||||
<if test="printerType != null">printer_type = #{printerType},</if>
|
||||
<if test="printerPid != null">printer_pid = #{printerPid},</if>
|
||||
<if test="company != null">company = #{company},</if>
|
||||
<if test="statusFlag != null">status_flag = #{statusFlag},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createDate != null">create_date = #{createDate},</if>
|
||||
<if test="updateDate != null">update_date = #{updateDate},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="deleteSysEquipmentPrinterById" parameterType="Long">
|
||||
update sys_equipment_printer set del_flag = 1 where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteSysEquipmentPrinterByIds" parameterType="String">
|
||||
update sys_equipment_printer set del_flag where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
<!--
|
||||
<delete id="deleteSysEquipmentPrinterById" parameterType="Long">
|
||||
delete from sys_equipment_printer where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysEquipmentPrinterByIds" parameterType="String">
|
||||
delete from sys_equipment_printer where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>-->
|
||||
</mapper>
|
||||
+96
@@ -0,0 +1,96 @@
|
||||
<?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.mhd.system.mapper.SysEquipmentTemplateMapper">
|
||||
|
||||
<resultMap type="SysEquipmentTemplate" id="SysEquipmentTemplateResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="templateName" column="template_name" />
|
||||
<result property="templateCont" column="template_cont" />
|
||||
<result property="remarks" column="remarks" />
|
||||
<result property="des" column="des" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="statusFlag" column="status_flag" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysEquipmentTemplateVo">
|
||||
select id, template_name, template_cont, remarks, des, create_time, update_time, status_flag, del_flag from sys_equipment_template
|
||||
</sql>
|
||||
|
||||
<select id="selectSysEquipmentTemplateList" parameterType="SysEquipmentTemplate" resultMap="SysEquipmentTemplateResult">
|
||||
<include refid="selectSysEquipmentTemplateVo"/>
|
||||
<where>
|
||||
<if test="templateName != null and templateName != ''"> and template_name like concat('%', #{templateName}, '%')</if>
|
||||
and del_flag = 0 and del_flag = 0
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysEquipmentTemplateById" parameterType="Long" resultMap="SysEquipmentTemplateResult">
|
||||
<include refid="selectSysEquipmentTemplateVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysEquipmentTemplate" parameterType="SysEquipmentTemplate" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sys_equipment_template
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="templateName != null">template_name,</if>
|
||||
<if test="templateCont != null">template_cont,</if>
|
||||
<if test="remarks != null">remarks,</if>
|
||||
<if test="des != null">des,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="statusFlag != null">status_flag,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="templateName != null">#{templateName},</if>
|
||||
<if test="templateCont != null">#{templateCont},</if>
|
||||
<if test="remarks != null">#{remarks},</if>
|
||||
<if test="des != null">#{des},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="statusFlag != null">#{statusFlag},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysEquipmentTemplate" parameterType="SysEquipmentTemplate">
|
||||
update sys_equipment_template
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="templateName != null">template_name = #{templateName},</if>
|
||||
<if test="templateCont != null">template_cont = #{templateCont},</if>
|
||||
<if test="remarks != null">remarks = #{remarks},</if>
|
||||
<if test="des != null">des = #{des},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="statusFlag != null">status_flag = #{statusFlag},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteSysEquipmentTemplateById" parameterType="Long">
|
||||
update sys_equipment_template set del_flag = 1 where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="deleteSysEquipmentTemplateByIds" parameterType="String">
|
||||
update sys_equipment_template set del_flag where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
<!--
|
||||
<delete id="deleteSysEquipmentTemplateById" parameterType="Long">
|
||||
delete from sys_equipment_template where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysEquipmentTemplateByIds" parameterType="String">
|
||||
delete from sys_equipment_template where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>-->
|
||||
</mapper>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?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.mhd.system.mapper.SysLogininforMapper">
|
||||
|
||||
<select id="selectLogininforList" parameterType="com.mhd.system.domain.dto.SysLogininforDTO" resultType="com.mhd.system.api.domain.SysLogininforPo">
|
||||
select * from sys_logininfor
|
||||
<where>
|
||||
<if test="userAccount != null and userAccount != ''">
|
||||
AND user_account like concat('%', #{userAccount}, '%')
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
AND organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(access_time,'%y%m%d') >= date_format(#{beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(access_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
</where>
|
||||
order by access_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<update id="cleanLogininfor">
|
||||
truncate table sys_logininfor
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,213 @@
|
||||
<?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.mhd.system.mapper.SysMenuMapper">
|
||||
|
||||
<resultMap type="SysMenu" id="SysMenuResult">
|
||||
<id property="menuId" column="menu_id" />
|
||||
<result property="menuName" column="menu_name" />
|
||||
<result property="parentName" column="parent_name" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="orderNum" column="order_num" />
|
||||
<result property="path" column="path" />
|
||||
<result property="component" column="component" />
|
||||
<result property="query" column="query" />
|
||||
<result property="isFrame" column="is_frame" />
|
||||
<result property="isCache" column="is_cache" />
|
||||
<result property="menuType" column="menu_type" />
|
||||
<result property="visible" column="visible" />
|
||||
<result property="status" column="status" />
|
||||
<result property="perms" column="perms" />
|
||||
<result property="icon" column="icon" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="sysType" column="sys_type" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMenuVo">
|
||||
select menu_id, menu_name, parent_id, order_num, path, component, `query`, is_frame, is_cache, menu_type, visible,sys_type, status, ifnull(perms,'') as perms, icon, create_time
|
||||
from sys_menu
|
||||
</sql>
|
||||
|
||||
<select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult">
|
||||
<include refid="selectMenuVo"/>
|
||||
<where>
|
||||
<if test="menuName != null and menuName != ''">
|
||||
AND menu_name like concat('%', #{menuName}, '%')
|
||||
</if>
|
||||
<if test="visible != null and visible != ''">
|
||||
AND visible = #{visible}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
|
||||
<if test="sysType != null and sysType != ''">
|
||||
AND sys_type = #{sysType}
|
||||
</if>
|
||||
</where>
|
||||
order by parent_id, order_num
|
||||
</select>
|
||||
|
||||
<select id="selectMenuTreeAll" resultMap="SysMenuResult">
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||
from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
|
||||
order by m.parent_id, m.order_num
|
||||
</select>
|
||||
|
||||
<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type,m.sys_type, m.icon, m.order_num, m.create_time
|
||||
from sys_menu m
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
left join sys_user_role ur on rm.role_id = ur.role_id
|
||||
left join sys_role ro on ur.role_id = ro.role_id
|
||||
where ur.user_id = #{params.userId}
|
||||
<if test="menuName != null and menuName != ''">
|
||||
AND m.menu_name like concat('%', #{menuName}, '%')
|
||||
</if>
|
||||
<if test="visible != null and visible != ''">
|
||||
AND m.visible = #{visible}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND m.status = #{status}
|
||||
</if>
|
||||
<!-- <if test="sysType != null and sysType != ''">-->
|
||||
<!-- AND m.sys_type = #{sysType}-->
|
||||
<!-- </if>-->
|
||||
order by m.parent_id, m.order_num
|
||||
</select>
|
||||
|
||||
<select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
|
||||
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
|
||||
from sys_menu m
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
left join sys_user_role ur on rm.role_id = ur.role_id
|
||||
left join sys_role ro on ur.role_id = ro.role_id
|
||||
left join sys_user u on ur.user_id = u.user_id
|
||||
where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = 0 AND ro.status = 0
|
||||
order by m.parent_id, m.order_num
|
||||
</select>
|
||||
|
||||
<select id="selectMenuListByRoleId" resultType="Long">
|
||||
select m.menu_id
|
||||
from sys_menu m
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
where rm.role_id = #{roleId}
|
||||
<if test="menuCheckStrictly">
|
||||
and m.menu_id not in (select m.parent_id from sys_menu m inner join sys_role_menu rm on m.menu_id = rm.menu_id and rm.role_id = #{roleId})
|
||||
</if>
|
||||
order by m.parent_id, m.order_num
|
||||
</select>
|
||||
<select id="selectMenuListByProductId" resultType="Long">
|
||||
select m.menu_id
|
||||
from sys_menu m
|
||||
left join sys_product_menu pm on m.menu_id = pm.menu_id
|
||||
where pm.product_id = #{productId}
|
||||
<if test="menuCheckStrictly">
|
||||
and m.menu_id not in (select m.parent_id from sys_menu m inner join sys_product_menu pm on m.menu_id = pm.menu_id and pm.product_id = #{productId})
|
||||
</if>
|
||||
order by m.parent_id, m.order_num
|
||||
</select>
|
||||
|
||||
<select id="selectMenuPerms" resultType="String">
|
||||
select distinct m.perms
|
||||
from sys_menu m
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
left join sys_user_role ur on rm.role_id = ur.role_id
|
||||
</select>
|
||||
|
||||
<select id="selectMenuPermsByUserId" parameterType="Long" resultType="String">
|
||||
select distinct m.perms
|
||||
from sys_menu m
|
||||
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
||||
left join sys_user_role ur on rm.role_id = ur.role_id
|
||||
left join sys_role r on r.role_id = ur.role_id
|
||||
where m.status = '0' and r.status = '0' and ur.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="selectMenuById" parameterType="Long" resultMap="SysMenuResult">
|
||||
<include refid="selectMenuVo"/>
|
||||
where menu_id = #{menuId}
|
||||
</select>
|
||||
|
||||
<select id="hasChildByMenuId" resultType="Integer">
|
||||
select count(1) from sys_menu where parent_id = #{menuId}
|
||||
</select>
|
||||
|
||||
<select id="checkMenuNameUnique" parameterType="SysMenu" resultMap="SysMenuResult">
|
||||
<include refid="selectMenuVo"/>
|
||||
where menu_name=#{menuName} and parent_id = #{parentId} limit 1
|
||||
</select>
|
||||
|
||||
<update id="updateMenu" parameterType="SysMenu">
|
||||
update sys_menu
|
||||
<set>
|
||||
<if test="menuName != null and menuName != ''">menu_name = #{menuName},</if>
|
||||
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||
<if test="orderNum != null">order_num = #{orderNum},</if>
|
||||
<if test="path != null and path != ''">path = #{path},</if>
|
||||
<if test="component != null">component = #{component},</if>
|
||||
<if test="query != null">`query` = #{query},</if>
|
||||
<if test="isFrame != null and isFrame != ''">is_frame = #{isFrame},</if>
|
||||
<if test="isCache != null and isCache != ''">is_cache = #{isCache},</if>
|
||||
<if test="menuType != null and menuType != ''">menu_type = #{menuType},</if>
|
||||
<if test="visible != null">visible = #{visible},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="perms !=null">perms = #{perms},</if>
|
||||
<if test="icon !=null and icon != ''">icon = #{icon},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where menu_id = #{menuId}
|
||||
</update>
|
||||
|
||||
<insert id="insertMenu" parameterType="SysMenu">
|
||||
insert into sys_menu(
|
||||
<if test="menuId != null and menuId != 0">menu_id,</if>
|
||||
<if test="parentId != null and parentId != 0">parent_id,</if>
|
||||
<if test="menuName != null and menuName != ''">menu_name,</if>
|
||||
<if test="orderNum != null">order_num,</if>
|
||||
<if test="path != null and path != ''">path,</if>
|
||||
<if test="component != null and component != ''">component,</if>
|
||||
<if test="query != null and query != ''">`query`,</if>
|
||||
<if test="isFrame != null and isFrame != ''">is_frame,</if>
|
||||
<if test="isCache != null and isCache != ''">is_cache,</if>
|
||||
<if test="menuType != null and menuType != ''">menu_type,</if>
|
||||
<if test="visible != null">visible,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="perms !=null and perms != ''">perms,</if>
|
||||
<if test="icon != null and icon != ''">icon,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="menuId != null and menuId != 0">#{menuId},</if>
|
||||
<if test="parentId != null and parentId != 0">#{parentId},</if>
|
||||
<if test="menuName != null and menuName != ''">#{menuName},</if>
|
||||
<if test="orderNum != null">#{orderNum},</if>
|
||||
<if test="path != null and path != ''">#{path},</if>
|
||||
<if test="component != null and component != ''">#{component},</if>
|
||||
<if test="query != null and query != ''">#{query},</if>
|
||||
<if test="isFrame != null and isFrame != ''">#{isFrame},</if>
|
||||
<if test="isCache != null and isCache != ''">#{isCache},</if>
|
||||
<if test="menuType != null and menuType != ''">#{menuType},</if>
|
||||
<if test="visible != null">#{visible},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="perms !=null and perms != ''">#{perms},</if>
|
||||
<if test="icon != null and icon != ''">#{icon},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<delete id="deleteMenuById" parameterType="Long">
|
||||
delete from sys_menu where menu_id = #{menuId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,82 @@
|
||||
<?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.mhd.system.mapper.SysMsgCenterMapper">
|
||||
|
||||
<resultMap type="SysMsgCenter" id="SysMsgCenterResult">
|
||||
<result property="msgCenterId" column="msg_center_id" />
|
||||
<result property="title" column="title" />
|
||||
<result property="content" column="content" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="msgStatus" column="msg_status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="msgType" column="msg_type" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysMsgCenterVo">
|
||||
select msg_center_id, title, content, create_time, msg_status, del_flag, msg_type from sys_msg_center
|
||||
</sql>
|
||||
|
||||
<select id="selectSysMsgCenterList" parameterType="com.mhd.system.domain.SysMsgCenter" resultMap="SysMsgCenterResult">
|
||||
<include refid="selectSysMsgCenterVo"/>
|
||||
<where>
|
||||
del_flag = 0
|
||||
<if test="title != null and title != ''"> and title like concat('%',#{title},'%')</if>
|
||||
<if test="content != null and content != ''"> and content = #{content}</if>
|
||||
<if test="msgStatus != null and msgStatus != ''"> and msg_status = #{msgStatus}</if>
|
||||
<if test="msgType != null and msgType != ''"> and msg_type like concat('%',#{msgType},'%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysMsgCenterByMsgCenterId" parameterType="Long" resultMap="SysMsgCenterResult">
|
||||
<include refid="selectSysMsgCenterVo"/>
|
||||
where msg_center_id = #{msgCenterId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysMsgCenter" parameterType="com.mhd.system.domain.SysMsgCenter" useGeneratedKeys="true" keyProperty="msgCenterId">
|
||||
insert into sys_msg_center
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null">title,</if>
|
||||
<if test="content != null">content,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="msgStatus != null">msg_status,</if>
|
||||
<if test="msgType != null">msg_type</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null">#{title},</if>
|
||||
<if test="content != null">#{content},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="msgStatus != null">#{msgStatus},</if>
|
||||
<if test="msgType != null">#{msgType},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysMsgCenter" parameterType="com.mhd.system.domain.SysMsgCenter">
|
||||
update sys_msg_center
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="title != null">title = #{title},</if>
|
||||
<if test="content != null">content = #{content},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="msgStatus != null">msg_status = #{msgStatus},</if>
|
||||
<if test="msgType != null">msg_type = #{msgType}</if>
|
||||
</trim>
|
||||
where msg_center_id = #{msgCenterId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysMsgCenterByMsgCenterId" parameterType="Long">
|
||||
delete from sys_msg_center where msg_center_id = #{msgCenterId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysMsgCenterByMsgCenterIds" parameterType="String">
|
||||
delete from sys_msg_center where msg_center_id in
|
||||
<foreach item="msgCenterId" collection="array" open="(" separator="," close=")">
|
||||
#{msgCenterId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,81 @@
|
||||
<?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.mhd.system.mapper.SysMsgPushMapper">
|
||||
|
||||
<resultMap type="com.mhd.system.domain.SysMsgPush" id="SysMsgPushResult">
|
||||
<id property="msgPushId" column="msg_push_id" />
|
||||
<result property="title" column="title" />
|
||||
<result property="content" column="content" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysMsgPushVo">
|
||||
select msg_push_id, title, content,create_by, create_time, update_by, update_time from sys_msg_push
|
||||
</sql>
|
||||
|
||||
<select id="selectSysMsgPushList" parameterType="com.mhd.system.domain.dto.SysMsgPushDTO" resultMap="SysMsgPushResult">
|
||||
<include refid="selectSysMsgPushVo"/>
|
||||
<where>
|
||||
del_flag = 0
|
||||
<if test="title != null and title != ''"> and title like concat('%', #{title} , '%') </if>
|
||||
<if test="content != null and content != ''"> and content = #{content}</if>
|
||||
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy} , '%')</if>
|
||||
<if test="params.begincreateTime != null and params.begincreateTime != ''">
|
||||
AND date_format(create_time,'%y%m%d') >= date_format(#{params.begincreateTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endcreateTime != null and params.endcreateTime != ''"><!-- 结束时间检索 -->
|
||||
AND date_format(create_time,'%y%m%d') <= date_format(#{params.endcreateTime},'%y%m%d')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectSysMsgPushByMsgPushId" parameterType="Long" resultMap="SysMsgPushResult">
|
||||
<include refid="selectSysMsgPushVo"/>
|
||||
where msg_push_id = #{msgPushId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysMsgPush" parameterType="com.mhd.system.domain.SysMsgPush" useGeneratedKeys="true" keyProperty="msgPushId">
|
||||
insert into sys_msg_push
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null">title,</if>
|
||||
<if test="content != null">content,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null">#{title},</if>
|
||||
<if test="content != null">#{content},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysMsgPush" parameterType="com.mhd.system.domain.SysMsgPush">
|
||||
update sys_msg_push
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="title != null">title = #{title},</if>
|
||||
<if test="content != null">content = #{content},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where msg_push_id = #{msgPushId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysMsgPushByMsgId" parameterType="Long">
|
||||
delete from sys_msg_push where msg_push_id = #{msgPushId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysMsgPushByMsgIds" parameterType="String">
|
||||
delete from sys_msg_push where msg_push_id in
|
||||
<foreach item="msgPushId" collection="array" open="(" separator="," close=")">
|
||||
#{msgPushId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,89 @@
|
||||
<?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.mhd.system.mapper.SysNoticeMapper">
|
||||
|
||||
<resultMap type="SysNotice" id="SysNoticeResult">
|
||||
<result property="noticeId" column="notice_id" />
|
||||
<result property="noticeTitle" column="notice_title" />
|
||||
<result property="noticeType" column="notice_type" />
|
||||
<result property="noticeContent" column="notice_content" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectNoticeVo">
|
||||
select notice_id, notice_title, notice_type, cast(notice_content as char) as notice_content, status, create_by, create_time, update_by, update_time, remark
|
||||
from sys_notice
|
||||
</sql>
|
||||
|
||||
<select id="selectNoticeById" parameterType="Long" resultMap="SysNoticeResult">
|
||||
<include refid="selectNoticeVo"/>
|
||||
where notice_id = #{noticeId}
|
||||
</select>
|
||||
|
||||
<select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult">
|
||||
<include refid="selectNoticeVo"/>
|
||||
<where>
|
||||
<if test="noticeTitle != null and noticeTitle != ''">
|
||||
AND notice_title like concat('%', #{noticeTitle}, '%')
|
||||
</if>
|
||||
<if test="noticeType != null and noticeType != ''">
|
||||
AND notice_type = #{noticeType}
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">
|
||||
AND create_by like concat('%', #{createBy}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertNotice" parameterType="SysNotice">
|
||||
insert into sys_notice (
|
||||
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
|
||||
<if test="noticeType != null and noticeType != '' ">notice_type, </if>
|
||||
<if test="noticeContent != null and noticeContent != '' ">notice_content, </if>
|
||||
<if test="status != null and status != '' ">status, </if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle}, </if>
|
||||
<if test="noticeType != null and noticeType != ''">#{noticeType}, </if>
|
||||
<if test="noticeContent != null and noticeContent != ''">#{noticeContent}, </if>
|
||||
<if test="status != null and status != ''">#{status}, </if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateNotice" parameterType="SysNotice">
|
||||
update sys_notice
|
||||
<set>
|
||||
<if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if>
|
||||
<if test="noticeType != null and noticeType != ''">notice_type = #{noticeType}, </if>
|
||||
<if test="noticeContent != null">notice_content = #{noticeContent}, </if>
|
||||
<if test="status != null and status != ''">status = #{status}, </if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where notice_id = #{noticeId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteNoticeById" parameterType="Long">
|
||||
delete from sys_notice where notice_id = #{noticeId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteNoticeByIds" parameterType="Long">
|
||||
delete from sys_notice where notice_id in
|
||||
<foreach item="noticeId" collection="array" open="(" separator="," close=")">
|
||||
#{noticeId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,50 @@
|
||||
<?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.mhd.system.mapper.SysOperLogMapper">
|
||||
|
||||
<sql id="selectOperLogVo">
|
||||
select *
|
||||
from sys_oper_log
|
||||
</sql>
|
||||
|
||||
<select id="selectOperLogList" parameterType="com.mhd.system.domain.dto.SysOperLogDTO" resultType="com.mhd.system.api.domain.SysOperLogPo">
|
||||
<include refid="selectOperLogVo"/>
|
||||
<where>
|
||||
<if test="businessType != null">
|
||||
AND business_type = #{businessType}
|
||||
</if>
|
||||
<if test="description != null and description != ''">
|
||||
AND description like concat('%', #{description}, '%')
|
||||
</if>
|
||||
<if test="userName != null and userName != ''">
|
||||
AND user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test="userAccount != null and userAccount != ''">
|
||||
AND user_account like concat('%', #{userAccount}, '%')
|
||||
</if>
|
||||
<if test="organizationName != null and organizationName != ''">
|
||||
AND organization_name like concat('%', #{organizationName}, '%')
|
||||
</if>
|
||||
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(oper_time,'%y%m%d') >= date_format(#{beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(oper_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="organizationId != null ">
|
||||
and organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="topOrganizationId != null ">
|
||||
and top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
</where>
|
||||
order by oper_time desc
|
||||
</select>
|
||||
|
||||
<update id="cleanOperLog">
|
||||
truncate table sys_oper_log
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,86 @@
|
||||
<?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.mhd.system.mapper.SysPlatCompanyMapper">
|
||||
|
||||
<resultMap type="SysPlatCompany" id="SysPlatCompanyResult">
|
||||
<result property="sysPlatId" column="sys_plat_id" />
|
||||
<result property="companyId" column="company_id" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
<resultMap type="SysPlatCompanyVO" id="SysPlatCompanyVOResult">
|
||||
<result property="sysPlatId" column="sys_plat_id" />
|
||||
<result property="companyId" column="company_id" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="companyName" column="company_name" />
|
||||
<result property="companyPhone" column="companyPhone" />
|
||||
<result property="productName" column="product_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysPlatCompanyVO">
|
||||
SELECT
|
||||
a.sys_plat_id,
|
||||
a.company_id,
|
||||
a.product_id,
|
||||
a.del_flag,
|
||||
b.company_name,
|
||||
b.user_name as companyPhone,
|
||||
c.product_name
|
||||
FROM
|
||||
sys_plat_company a
|
||||
LEFT JOIN sys_company b ON a.company_id = b.company_id
|
||||
LEFT JOIN sys_product c ON a.product_id = c.product_id
|
||||
</sql>
|
||||
|
||||
<select id="selectSysPlatCompanyList" parameterType="sysPlatCompanyDTO" resultMap="SysPlatCompanyVOResult">
|
||||
<include refid="selectSysPlatCompanyVO"/>
|
||||
<where>
|
||||
<if test="companyId != null "> and a.company_id = #{companyId}</if>
|
||||
<if test="productId != null "> and a.product_id = #{productId}</if>
|
||||
<if test="companyName != null and companyName != ''"> and b.company_name like concat('%', #{companyName}, '%')</if>
|
||||
<if test="productName != null and productName != ''"> and c.product_ame like concat('%', #{productName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysPlatCompanyBySysPlatId" parameterType="Long" resultMap="SysPlatCompanyResult">
|
||||
<include refid="selectSysPlatCompanyVO"/>
|
||||
where sys_plat_id = #{sysPlatId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysPlatCompany" parameterType="SysPlatCompany" useGeneratedKeys="true" keyProperty="sysPlatId">
|
||||
insert into sys_plat_company
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="companyId != null">company_id,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="companyId != null">#{companyId},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysPlatCompany" parameterType="SysPlatCompany">
|
||||
update sys_plat_company
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="companyId != null">company_id = #{companyId},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where sys_plat_id = #{sysPlatId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysPlatCompanyBySysPlatId" parameterType="Long">
|
||||
delete from sys_plat_company where sys_plat_id = #{sysPlatId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysPlatCompanyBySysPlatIds" parameterType="String">
|
||||
delete from sys_plat_company where sys_plat_id in
|
||||
<foreach item="sysPlatId" collection="array" open="(" separator="," close=")">
|
||||
#{sysPlatId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,122 @@
|
||||
<?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.mhd.system.mapper.SysPostMapper">
|
||||
|
||||
<resultMap type="SysPost" id="SysPostResult">
|
||||
<id property="postId" column="post_id" />
|
||||
<result property="postCode" column="post_code" />
|
||||
<result property="postName" column="post_name" />
|
||||
<result property="postSort" column="post_sort" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPostVo">
|
||||
select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark
|
||||
from sys_post
|
||||
</sql>
|
||||
|
||||
<select id="selectPostList" parameterType="SysPost" resultMap="SysPostResult">
|
||||
<include refid="selectPostVo"/>
|
||||
<where>
|
||||
<if test="postCode != null and postCode != ''">
|
||||
AND post_code like concat('%', #{postCode}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="postName != null and postName != ''">
|
||||
AND post_name like concat('%', #{postName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectPostAll" resultMap="SysPostResult">
|
||||
<include refid="selectPostVo"/>
|
||||
</select>
|
||||
|
||||
<select id="selectPostById" parameterType="Long" resultMap="SysPostResult">
|
||||
<include refid="selectPostVo"/>
|
||||
where post_id = #{postId}
|
||||
</select>
|
||||
|
||||
<select id="selectPostListByUserId" parameterType="Long" resultType="Long">
|
||||
select p.post_id
|
||||
from sys_post p
|
||||
left join sys_user_post up on up.post_id = p.post_id
|
||||
left join sys_user u on u.user_id = up.user_id
|
||||
where u.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="selectPostsByUserName" parameterType="String" resultMap="SysPostResult">
|
||||
select p.post_id, p.post_name, p.post_code
|
||||
from sys_post p
|
||||
left join sys_user_post up on up.post_id = p.post_id
|
||||
left join sys_user u on u.user_id = up.user_id
|
||||
where u.user_name = #{userName}
|
||||
</select>
|
||||
|
||||
<select id="checkPostNameUnique" parameterType="String" resultMap="SysPostResult">
|
||||
<include refid="selectPostVo"/>
|
||||
where post_name=#{postName} limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkPostCodeUnique" parameterType="String" resultMap="SysPostResult">
|
||||
<include refid="selectPostVo"/>
|
||||
where post_code=#{postCode} limit 1
|
||||
</select>
|
||||
|
||||
<update id="updatePost" parameterType="SysPost">
|
||||
update sys_post
|
||||
<set>
|
||||
<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
|
||||
<if test="postName != null and postName != ''">post_name = #{postName},</if>
|
||||
<if test="postSort != null and postSort != ''">post_sort = #{postSort},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where post_id = #{postId}
|
||||
</update>
|
||||
|
||||
<insert id="insertPost" parameterType="SysPost" useGeneratedKeys="true" keyProperty="postId">
|
||||
insert into sys_post(
|
||||
<if test="postId != null and postId != 0">post_id,</if>
|
||||
<if test="postCode != null and postCode != ''">post_code,</if>
|
||||
<if test="postName != null and postName != ''">post_name,</if>
|
||||
<if test="postSort != null and postSort != ''">post_sort,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="postId != null and postId != 0">#{postId},</if>
|
||||
<if test="postCode != null and postCode != ''">#{postCode},</if>
|
||||
<if test="postName != null and postName != ''">#{postName},</if>
|
||||
<if test="postSort != null and postSort != ''">#{postSort},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<delete id="deletePostById" parameterType="Long">
|
||||
delete from sys_post where post_id = #{postId}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePostByIds" parameterType="Long">
|
||||
delete from sys_post where post_id in
|
||||
<foreach collection="array" item="postId" open="(" separator="," close=")">
|
||||
#{postId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,85 @@
|
||||
<?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.mhd.system.mapper.SysProductMapper">
|
||||
|
||||
<resultMap type="com.mhd.system.domain.SysProduct" id="SysProductResult">
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="productVersion" column="product_version" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="menuCheckStrictly" column="menu_check_strictly" />
|
||||
</resultMap>
|
||||
<resultMap type="com.mhd.system.domain.vo.SysProductVO" id="SysProductVOResult">
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="productVersion" column="product_version" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="menuCheckStrictly" column="menu_check_strictly" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysProductVo">
|
||||
select product_id, product_name, del_flag, menu_check_strictly,product_version from sys_product
|
||||
</sql>
|
||||
|
||||
<select id="selectSysProductList" parameterType="com.mhd.system.domain.SysProduct" resultMap="SysProductResult">
|
||||
<include refid="selectSysProductVo"/>
|
||||
<where>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysProductByProductId" parameterType="java.lang.Long" resultMap="SysProductResult">
|
||||
<include refid="selectSysProductVo"/>
|
||||
where product_id = #{productId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysProduct" parameterType="com.mhd.system.domain.SysProduct">
|
||||
insert into sys_product
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="productVersion != null">product_version,</if>
|
||||
<if test="menuCheckStrictly != null">menu_check_strictly,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="productVersion != null">#{productVersion},</if>
|
||||
<if test="menuCheckStrictly != null">#{menuCheckStrictly},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysProduct" parameterType="com.mhd.system.domain.SysProduct">
|
||||
update sys_product
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="menuCheckStrictly != null">menu_check_strictly = #{menuCheckStrictly},</if>
|
||||
</trim>
|
||||
where product_id = #{productId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysProductByProductId" parameterType="java.lang.Long">
|
||||
delete from sys_product where product_id = #{productId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysProductByProductIds" parameterType="java.lang.String">
|
||||
delete from sys_product where product_id in
|
||||
<foreach item="productId" collection="array" open="(" separator="," close=")">
|
||||
#{productId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="selectProductById" parameterType="java.lang.Long" resultMap="SysProductResult">
|
||||
<include refid="selectSysProductVo"/>
|
||||
where product_id = #{productId}
|
||||
</select>
|
||||
|
||||
<select id="selectProductByProductName" parameterType="com.mhd.system.domain.dto.SysProductDTO" resultMap="SysProductResult">
|
||||
<include refid="selectSysProductVo"/>
|
||||
where product_name = #{productName} and del_flag = 0
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,71 @@
|
||||
<?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.mhd.system.mapper.SysProductMenuMapper">
|
||||
|
||||
<resultMap type="SysProductMenu" id="SysProductMenuResult">
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="menuId" column="menu_id" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysProductMenuVo">
|
||||
select product_id, menu_id, del_flag from sys_product_menu
|
||||
</sql>
|
||||
|
||||
<select id="selectSysProductMenuList" parameterType="SysProductMenu" resultMap="SysProductMenuResult">
|
||||
<include refid="selectSysProductMenuVo"/>
|
||||
<where>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysProductMenuByProductId" parameterType="Long" resultMap="SysProductMenuResult">
|
||||
<include refid="selectSysProductMenuVo"/>
|
||||
where product_id = #{productId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysProductMenu" parameterType="SysProductMenu">
|
||||
insert into sys_product_menu
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="menuId != null">menu_id,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="menuId != null">#{menuId},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysProductMenu" parameterType="SysProductMenu">
|
||||
update sys_product_menu
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="menuId != null">menu_id = #{menuId},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where product_id = #{productId}
|
||||
</update>
|
||||
|
||||
<!-- 根据产品ID删除产品与菜单ID关联-->
|
||||
<delete id="deleteSysProductMenuByProductId" parameterType="Long">
|
||||
delete from sys_product_menu where product_id = #{productId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysProductMenuByProductIds" parameterType="String">
|
||||
delete from sys_product_menu where product_id in
|
||||
<foreach item="productId" collection="array" open="(" separator="," close=")">
|
||||
#{productId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 插入产品ID与菜单ID -->
|
||||
<insert id="batchProductMenu">
|
||||
insert into sys_product_menu(product_id, menu_id) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.productId},#{item.menuId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mhd.system.mapper.SysRoleDeptMapper">
|
||||
|
||||
<resultMap type="SysRoleDept" id="SysRoleDeptResult">
|
||||
<result property="roleId" column="role_id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
</resultMap>
|
||||
|
||||
<delete id="deleteRoleDeptByRoleId" parameterType="Long">
|
||||
delete from sys_role_dept where role_id=#{roleId}
|
||||
</delete>
|
||||
|
||||
<select id="selectCountRoleDeptByDeptId" resultType="Integer">
|
||||
select count(1) from sys_role_dept where dept_id=#{deptId}
|
||||
</select>
|
||||
|
||||
<delete id="deleteRoleDept" parameterType="Long">
|
||||
delete from sys_role_dept where role_id in
|
||||
<foreach collection="array" item="roleId" open="(" separator="," close=")">
|
||||
#{roleId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchRoleDept">
|
||||
insert into sys_role_dept(role_id, dept_id) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.roleId},#{item.deptId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,174 @@
|
||||
<?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.mhd.system.mapper.SysRoleMapper">
|
||||
|
||||
<resultMap type="SysRole" id="SysRoleResult">
|
||||
<id property="roleId" column="role_id" />
|
||||
<result property="roleName" column="role_name" />
|
||||
<result property="roleKey" column="role_key" />
|
||||
<result property="roleSort" column="role_sort" />
|
||||
<result property="dataScope" column="data_scope" />
|
||||
<result property="menuCheckStrictly" column="menu_check_strictly" />
|
||||
<result property="deptCheckStrictly" column="dept_check_strictly" />
|
||||
<result property="status" column="status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="roleType" column="role_type" />
|
||||
<result property="companyId" column="company_id" />
|
||||
<result property="companyName" column="company_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRoleVo">
|
||||
select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly,
|
||||
r.status, r.del_flag, r.create_time, r.remark ,r.role_type,r.company_id,c.company_name
|
||||
from sys_role r
|
||||
left join sys_user_role ur on ur.role_id = r.role_id
|
||||
left join sys_user u on u.user_id = ur.user_id
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_company c on r.company_id = c.company_id
|
||||
</sql>
|
||||
|
||||
<select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult">
|
||||
<include refid="selectRoleVo"/>
|
||||
where r.del_flag = '0'
|
||||
<if test="roleId != null and roleId != 0">
|
||||
AND r.role_id = #{roleId}
|
||||
</if>
|
||||
<if test="roleName != null and roleName != ''">
|
||||
AND r.role_name like concat('%', #{roleName}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND r.status = #{status}
|
||||
</if>
|
||||
<if test="roleKey != null and roleKey != ''">
|
||||
AND r.role_key like concat('%', #{roleKey}, '%')
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(r.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(r.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="roleType != null and roleType != ''">
|
||||
AND r.role_type = #{roleType}
|
||||
</if>
|
||||
<if test="companyId != null and companyId != ''">
|
||||
AND r.company_id = #{companyId}
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">
|
||||
AND r.create_by = #{createBy}
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
order by r.role_sort
|
||||
</select>
|
||||
|
||||
<select id="selectRolePermissionByUserId" parameterType="Long" resultMap="SysRoleResult">
|
||||
<include refid="selectRoleVo"/>
|
||||
WHERE r.del_flag = '0' and ur.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="selectRoleAll" resultMap="SysRoleResult">
|
||||
<include refid="selectRoleVo"/>
|
||||
</select>
|
||||
|
||||
<select id="selectRoleListByUserId" parameterType="Long" resultType="Long">
|
||||
select r.role_id
|
||||
from sys_role r
|
||||
left join sys_user_role ur on ur.role_id = r.role_id
|
||||
left join sys_user u on u.user_id = ur.user_id
|
||||
where u.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="selectRoleById" parameterType="Long" resultMap="SysRoleResult">
|
||||
<include refid="selectRoleVo"/>
|
||||
where r.role_id = #{roleId}
|
||||
</select>
|
||||
<select id="selectRoleByRoleKey" parameterType="String" resultMap="SysRoleResult">
|
||||
<include refid="selectRoleVo"/>
|
||||
where r.role_key = #{roleKey}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectRolesByUserName" parameterType="String" resultMap="SysRoleResult">
|
||||
<include refid="selectRoleVo"/>
|
||||
WHERE r.del_flag = '0' and u.user_name = #{userName}
|
||||
</select>
|
||||
|
||||
<select id="checkRoleNameUnique" parameterType="String" resultMap="SysRoleResult">
|
||||
<include refid="selectRoleVo"/>
|
||||
where r.role_name=#{roleName} limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkRoleKeyUnique" parameterType="String" resultMap="SysRoleResult">
|
||||
<include refid="selectRoleVo"/>
|
||||
where r.role_key=#{roleKey} limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
|
||||
insert into sys_role(
|
||||
<if test="roleId != null and roleId != 0">role_id,</if>
|
||||
<if test="roleName != null and roleName != ''">role_name,</if>
|
||||
<if test="roleKey != null and roleKey != ''">role_key,</if>
|
||||
<if test="roleSort != null and roleSort != ''">role_sort,</if>
|
||||
<if test="dataScope != null and dataScope != ''">data_scope,</if>
|
||||
<if test="menuCheckStrictly != null">menu_check_strictly,</if>
|
||||
<if test="deptCheckStrictly != null">dept_check_strictly,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="roleType != null and roleType != ''">role_type,</if>
|
||||
<if test="companyId != null and companyId != ''">company_id,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="roleId != null and roleId != 0">#{roleId},</if>
|
||||
<if test="roleName != null and roleName != ''">#{roleName},</if>
|
||||
<if test="roleKey != null and roleKey != ''">#{roleKey},</if>
|
||||
<if test="roleSort != null and roleSort != ''">#{roleSort},</if>
|
||||
<if test="dataScope != null and dataScope != ''">#{dataScope},</if>
|
||||
<if test="menuCheckStrictly != null">#{menuCheckStrictly},</if>
|
||||
<if test="deptCheckStrictly != null">#{deptCheckStrictly},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="roleType != null and roleType != ''">#{roleType},</if>
|
||||
<if test="companyId != null and companyId != ''">#{companyId},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateRole" parameterType="SysRole">
|
||||
update sys_role
|
||||
<set>
|
||||
<if test="roleName != null and roleName != ''">role_name = #{roleName},</if>
|
||||
<if test="roleKey != null and roleKey != ''">role_key = #{roleKey},</if>
|
||||
<if test="roleSort != null and roleSort != ''">role_sort = #{roleSort},</if>
|
||||
<if test="dataScope != null and dataScope != ''">data_scope = #{dataScope},</if>
|
||||
<if test="menuCheckStrictly != null">menu_check_strictly = #{menuCheckStrictly},</if>
|
||||
<if test="deptCheckStrictly != null">dept_check_strictly = #{deptCheckStrictly},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where role_id = #{roleId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRoleById" parameterType="Long">
|
||||
update sys_role set del_flag = '2' where role_id = #{roleId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRoleByIds" parameterType="Long">
|
||||
update sys_role set del_flag = '2' where role_id in
|
||||
<foreach collection="array" item="roleId" open="(" separator="," close=")">
|
||||
#{roleId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mhd.system.mapper.SysRoleMenuMapper">
|
||||
|
||||
<resultMap type="SysRoleMenu" id="SysRoleMenuResult">
|
||||
<result property="roleId" column="role_id" />
|
||||
<result property="menuId" column="menu_id" />
|
||||
</resultMap>
|
||||
|
||||
<select id="checkMenuExistRole" resultType="Integer">
|
||||
select count(1) from sys_role_menu where menu_id = #{menuId}
|
||||
</select>
|
||||
|
||||
<delete id="deleteRoleMenuByRoleId" parameterType="Long">
|
||||
delete from sys_role_menu where role_id=#{roleId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRoleMenu" parameterType="Long">
|
||||
delete from sys_role_menu where role_id in
|
||||
<foreach collection="array" item="roleId" open="(" separator="," close=")">
|
||||
#{roleId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchRoleMenu">
|
||||
insert into sys_role_menu(role_id, menu_id) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.roleId},#{item.menuId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
<?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.mhd.system.mapper.SysTenantManagementMapper">
|
||||
|
||||
<resultMap type="com.mhd.system.domain.vo.SysTenantManagementVO" id="SysTenantManagementResult">
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="companyId" column="company_id" />
|
||||
<result property="accountingId" column="accounting_id" />
|
||||
<result property="chargeAmount" column="charge_amount" />
|
||||
<result property="tenantPhone" column="tenant_phone" />
|
||||
<result property="status" column="status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="accountingDetail" column="accounting_detail" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysTenantManagementVo">
|
||||
SELECT
|
||||
a.tenant_id,
|
||||
a.product_id,
|
||||
a.company_id,
|
||||
a.accounting_id,
|
||||
a.charge_amount,
|
||||
a.tenant_phone,
|
||||
a.`status`,
|
||||
a.del_flag,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time ,
|
||||
a.accounting_detail ,
|
||||
c.company_name companyName,
|
||||
d.product_name productName
|
||||
FROM
|
||||
sys_tenant_management a
|
||||
LEFT JOIN sys_accounting_rules b on a.accounting_id = b.accounting_id
|
||||
LEFT JOIN sys_company c on a.company_id = c.company_id
|
||||
LEFT JOIN sys_product d on a.product_id = d.product_id
|
||||
</sql>
|
||||
|
||||
<select id="selectSysTenantManagementList" parameterType="com.mhd.system.domain.dto.SysTenantManagementDTO" resultMap="SysTenantManagementResult">
|
||||
<include refid="selectSysTenantManagementVo"/>
|
||||
where a.del_flag = 0
|
||||
<if test="productName != null and productName != ''"> and product_name = #{productName}</if>
|
||||
<if test="companyName != null and companyName != ''"> and company_name = #{companyName}</if>
|
||||
<if test="tenantPhone != null and tenantPhone != ''"> and tenant_phone like concat('%', #{tenantPhone}, '%')</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
order by a.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectSysTenantManagementByTenantId" parameterType="Long" resultMap="SysTenantManagementResult">
|
||||
<include refid="selectSysTenantManagementVo"/>
|
||||
where a.tenant_id = #{tenantId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysTenantManagement" parameterType="SysTenantManagement" useGeneratedKeys="true" keyProperty="tenantId">
|
||||
insert into sys_tenant_management
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="companyId != null">company_id,</if>
|
||||
<if test="accountingId != null">accounting_id,</if>
|
||||
<if test="chargeAmount != null">charge_amount,</if>
|
||||
<if test="tenantPhone != null and tenantPhone != ''">tenant_phone,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="accountingDetail != null and accountingDetail != ''">accounting_detail,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="companyId != null">#{companyId},</if>
|
||||
<if test="accountingId != null">#{accountingId},</if>
|
||||
<if test="chargeAmount != null">#{chargeAmount},</if>
|
||||
<if test="tenantPhone != null and tenantPhone != ''">#{tenantPhone},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="accountingDetail != null and accountingDetail != ''">#{accountingDetail},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysTenantManagement" parameterType="SysTenantManagement">
|
||||
update sys_tenant_management
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="companyId != null">company_id = #{companyId},</if>
|
||||
<if test="accountingId != null">accounting_id = #{accountingId},</if>
|
||||
<if test="chargeAmount != null">charge_amount = #{chargeAmount},</if>
|
||||
<if test="tenantPhone != null and tenantPhone != ''">tenant_phone = #{tenantPhone},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="accountingDetail != null and accountingDetail != ''">accounting_detail = #{accountingDetail},</if>
|
||||
</trim>
|
||||
where tenant_id = #{tenantId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysTenantManagementByTenantId" parameterType="Long">
|
||||
update sys_tenant_management set del_flag = 1 where tenant_id = #{tenantId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysTenantManagementByTenantIds" parameterType="String">
|
||||
update sys_tenant_management set del_flag = 1 where tenant_id in
|
||||
<foreach item="tenantId" collection="array" open="(" separator="," close=")">
|
||||
#{tenantId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,229 @@
|
||||
<?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.mhd.system.mapper.SysUserMapper">
|
||||
|
||||
<resultMap type="com.mhd.system.api.domain.SysUser" id="SysUserResult">
|
||||
<id property="userId" column="user_id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
<result property="email" column="email" />
|
||||
<result property="phonenumber" column="phonenumber" />
|
||||
<result property="sex" column="sex" />
|
||||
<result property="avatar" column="avatar" />
|
||||
<result property="password" column="password" />
|
||||
<result property="status" column="status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="loginIp" column="login_ip" />
|
||||
<result property="loginDate" column="login_date" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="companyId" column="company_id" />
|
||||
<result property="companyName" column="company_name" />
|
||||
<association property="dept" column="dept_id" javaType="com.mhd.system.api.domain.SysDept" resultMap="deptResult" />
|
||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="deptResult" type="com.mhd.system.api.domain.SysDept">
|
||||
<id property="deptId" column="dept_id" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="deptName" column="dept_name" />
|
||||
<result property="ancestors" column="ancestors" />
|
||||
<result property="orderNum" column="order_num" />
|
||||
<result property="leader" column="leader" />
|
||||
<result property="status" column="dept_status" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="RoleResult" type="com.mhd.system.api.domain.SysRole">
|
||||
<id property="roleId" column="role_id" />
|
||||
<result property="roleName" column="role_name" />
|
||||
<result property="roleKey" column="role_key" />
|
||||
<result property="roleSort" column="role_sort" />
|
||||
<result property="dataScope" column="data_scope" />
|
||||
<result property="status" column="role_status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUserVo">
|
||||
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
||||
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
|
||||
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,u.company_id
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
left join sys_role r on r.role_id = ur.role_id
|
||||
</sql>
|
||||
|
||||
<select id="selectUserList" parameterType="com.mhd.system.api.domain.SysUser" resultMap="SysUserResult">
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader,c.company_name from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_company c on u.company_id = c.company_id
|
||||
where u.del_flag = '0'
|
||||
<if test="userId != null and userId != 0">
|
||||
AND u.user_id = #{userId}
|
||||
</if>
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND u.status = #{status}
|
||||
</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">
|
||||
AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
AND date_format(u.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
AND date_format(u.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="deptId != null and deptId != 0">
|
||||
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
|
||||
</if>
|
||||
<if test="companyId != null ">
|
||||
AND u.company_id = #{companyId}
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
<select id="selectAllocatedList" parameterType="com.mhd.system.api.domain.SysUser" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
left join sys_role r on r.role_id = ur.role_id
|
||||
where u.del_flag = '0' and r.role_id = #{roleId}
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">
|
||||
AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
<select id="selectUnallocatedList" parameterType="com.mhd.system.api.domain.SysUser" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
left join sys_user_role ur on u.user_id = ur.user_id
|
||||
left join sys_role r on r.role_id = ur.role_id
|
||||
where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL)
|
||||
and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and ur.role_id = #{roleId})
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">
|
||||
AND u.phonenumber like concat('%', #{phonenumber}, '%')
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
<select id="selectUserByUserName" parameterType="java.lang.String" resultMap="SysUserResult">
|
||||
<include refid="selectUserVo"/>
|
||||
where u.user_name = #{userName}
|
||||
</select>
|
||||
|
||||
<select id="selectUserById" parameterType="java.lang.Long" resultMap="SysUserResult">
|
||||
<include refid="selectUserVo"/>
|
||||
where u.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="checkUserNameUnique" parameterType="String" resultType="int">
|
||||
select count(1) from sys_user where user_name = #{userName} limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
|
||||
select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
|
||||
select user_id, email from sys_user where email = #{email} limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
|
||||
insert into sys_user(
|
||||
<if test="userId != null and userId != 0">user_id,</if>
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name,</if>
|
||||
<if test="email != null and email != ''">email,</if>
|
||||
<if test="avatar != null and avatar != ''">avatar,</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
|
||||
<if test="sex != null and sex != ''">sex,</if>
|
||||
<if test="password != null and password != ''">password,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="companyId != null and companyId != ''">company_id,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="userId != null and userId != ''">#{userId},</if>
|
||||
<if test="deptId != null and deptId != ''">#{deptId},</if>
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="nickName != null and nickName != ''">#{nickName},</if>
|
||||
<if test="email != null and email != ''">#{email},</if>
|
||||
<if test="avatar != null and avatar != ''">#{avatar},</if>
|
||||
<if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
|
||||
<if test="sex != null and sex != ''">#{sex},</if>
|
||||
<if test="password != null and password != ''">#{password},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="companyId != null and companyId != ''">#{companyId},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateUser" parameterType="SysUser">
|
||||
update sys_user
|
||||
<set>
|
||||
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
|
||||
<if test="email != null ">email = #{email},</if>
|
||||
<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
|
||||
<if test="sex != null and sex != ''">sex = #{sex},</if>
|
||||
<if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
|
||||
<if test="password != null and password != ''">password = #{password},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
|
||||
<if test="loginDate != null">login_date = #{loginDate},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
<update id="updateUserStatus" parameterType="SysUser">
|
||||
update sys_user set status = #{status} where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
<update id="updateUserAvatar" parameterType="SysUser">
|
||||
update sys_user set avatar = #{avatar} where user_name = #{userName}
|
||||
</update>
|
||||
|
||||
<update id="resetUserPwd" parameterType="SysUser">
|
||||
update sys_user set password = #{password} where user_name = #{userName}
|
||||
</update>
|
||||
|
||||
<delete id="deleteUserById" parameterType="Long">
|
||||
update sys_user set del_flag = '2' where user_id = #{userId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUserByIds" parameterType="Long">
|
||||
update sys_user set del_flag = '2' where user_id in
|
||||
<foreach collection="array" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mhd.system.mapper.SysUserPostMapper">
|
||||
|
||||
<resultMap type="SysUserPost" id="SysUserPostResult">
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="postId" column="post_id" />
|
||||
</resultMap>
|
||||
|
||||
<delete id="deleteUserPostByUserId" parameterType="Long">
|
||||
delete from sys_user_post where user_id=#{userId}
|
||||
</delete>
|
||||
|
||||
<select id="countUserPostById" resultType="Integer">
|
||||
select count(1) from sys_user_post where post_id=#{postId}
|
||||
</select>
|
||||
|
||||
<delete id="deleteUserPost" parameterType="Long">
|
||||
delete from sys_user_post where user_id in
|
||||
<foreach collection="array" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchUserPost">
|
||||
insert into sys_user_post(user_id, post_id) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.userId},#{item.postId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,44 @@
|
||||
<?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.mhd.system.mapper.SysUserRoleMapper">
|
||||
|
||||
<resultMap type="SysUserRole" id="SysUserRoleResult">
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="roleId" column="role_id" />
|
||||
</resultMap>
|
||||
|
||||
<delete id="deleteUserRoleByUserId" parameterType="Long">
|
||||
delete from sys_user_role where user_id=#{userId}
|
||||
</delete>
|
||||
|
||||
<select id="countUserRoleByRoleId" resultType="Integer">
|
||||
select count(1) from sys_user_role where role_id=#{roleId}
|
||||
</select>
|
||||
|
||||
<delete id="deleteUserRole" parameterType="Long">
|
||||
delete from sys_user_role where user_id in
|
||||
<foreach collection="array" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<insert id="batchUserRole">
|
||||
insert into sys_user_role(user_id, role_id) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.userId},#{item.roleId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteUserRoleInfo" parameterType="SysUserRole">
|
||||
delete from sys_user_role where user_id=#{userId} and role_id=#{roleId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUserRoleInfos">
|
||||
delete from sys_user_role where role_id=#{roleId} and user_id in
|
||||
<foreach collection="userIds" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user