feat:pg数据库适配

pg_adapter
wangxy 5 months ago
parent 7236090158
commit 34e27ab031

@ -56,6 +56,11 @@
<version>8.6.0</version>
</dependency>
<!-- postgresql驱动包 -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
<!-- 核心模块-->
<dependency>

@ -79,7 +79,7 @@ public class SysMeetingnumController extends BaseController {
AtomicReference<Long> yAxis = new AtomicReference<>(0L);
Integer count = new LambdaQueryChainWrapper<>(tdMeetingService.getBaseMapper())
.ge(TdMeeting::getMeetingTime, minDayTime)
.le(TdMeeting::getMeetingTime, maxDayTime).eq(TdMeeting::getMeetingState,1).count();
.le(TdMeeting::getMeetingTime, maxDayTime).eq(TdMeeting::getMeetingState,'1').count();
if (Objects.isNull(count)) {
count = 0;
}
@ -88,7 +88,7 @@ public class SysMeetingnumController extends BaseController {
AtomicReference<Long> yAxisW = new AtomicReference<>(0L);
Integer countW = new LambdaQueryChainWrapper<>(tdMeetingService.getBaseMapper())
.ge(TdMeeting::getMeetingTime, minDayTime)
.le(TdMeeting::getMeetingTime, maxDayTime).eq(TdMeeting::getMeetingState,0).count();
.le(TdMeeting::getMeetingTime, maxDayTime).eq(TdMeeting::getMeetingState,'0').count();
if (Objects.isNull(countW)) {
countW = 0;
}
@ -98,7 +98,7 @@ public class SysMeetingnumController extends BaseController {
AtomicReference<Long> yAxisXs = new AtomicReference<>(0L);
Integer countXs= new LambdaQueryChainWrapper<>(tdMeetingService.getBaseMapper())
.ge(TdMeeting::getMeetingTime, minDayTime)
.le(TdMeeting::getMeetingTime, maxDayTime).eq(TdMeeting::getMeetingType,0).count();
.le(TdMeeting::getMeetingTime, maxDayTime).eq(TdMeeting::getMeetingType,'0').count();
if (Objects.isNull(countXs)) {
countXs = 0;
}
@ -108,7 +108,7 @@ public class SysMeetingnumController extends BaseController {
AtomicReference<Long> yAxisXx = new AtomicReference<>(0L);
Integer countXx= new LambdaQueryChainWrapper<>(tdMeetingService.getBaseMapper())
.ge(TdMeeting::getMeetingTime, minDayTime)
.le(TdMeeting::getMeetingTime, maxDayTime).eq(TdMeeting::getMeetingType,1).count();
.le(TdMeeting::getMeetingTime, maxDayTime).eq(TdMeeting::getMeetingType,'1').count();
if (Objects.isNull(countXx)) {
countXx = 0;
}

@ -152,11 +152,11 @@ public class SysPropertynumController extends BaseController {
value.set(propertyStateCountDTO.getYbf());
} else if("设备未报废".equals(name)) {
value.set(tdPropertyEmentService.lambdaQuery()
.eq(TdPropertyEment::getDestoryType,0)
.eq(TdPropertyEment::getDestoryType,'0')
.count());
}else{
value.set(tdPropertyEmentService.lambdaQuery()
.eq(TdPropertyEment::getDestoryType,1)
.eq(TdPropertyEment::getDestoryType,'1')
.count());
}
JSONObject jsonObject = new JSONObject();

@ -214,8 +214,8 @@ public class SysUsernumController extends BaseController {
Integer count = new LambdaQueryChainWrapper<>(userService.getBaseMapper())
.ge(SysUser::getCreateTime, minDayTime)
.le(SysUser::getCreateTime, maxDayTime)
.eq(SysUser::getExamine,2)
.eq(SysUser::getDelFlag,0)
.eq(SysUser::getExamine,'2')
.eq(SysUser::getDelFlag,'0')
.count();
if(Objects.isNull(count)){
count = 0;

@ -0,0 +1,63 @@
# 数据源配置
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: org.postgresql.Driver
druid:
# 主库数据源
master:
url: jdbc:postgresql://192.168.254.176:5432/zhky-test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
#username: postgres
#password: Qwer@1234
username: ENC(VgQ8l+KHU0mxNmIYq7AIJyOFFXlZNSuN)
password: ENC(c56B47zIjIRcbSTAmqp5GzCH5bVa+Nai)
# 从库数据源
slave:
# 从数据源开关/默认关闭
enabled: false
url:
username:
password:
# 初始连接数
initialSize: 5
# 最小连接池数量
minIdle: 10
# 最大连接池数量
maxActive: 20
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置连接超时时间
connectTimeout: 30000
# 配置网络超时时间
socketTimeout: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
timeBetweenEvictionRunsMillis: 60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
minEvictableIdleTimeMillis: 300000
# 配置一个连接在池中最大生存的时间,单位是毫秒
maxEvictableIdleTimeMillis: 900000
# 配置检测连接是否有效
validationQuery: SELECT 1
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
webStatFilter:
enabled: true
statViewServlet:
enabled: true
# 设置白名单,不填则允许所有访问
allow:
url-pattern: /druid/*
# 控制台管理用户名和密码
login-username: ruoyi
login-password: 123456
filter:
stat:
enabled: true
# 慢SQL记录
log-slow-sql: true
slow-sql-millis: 1000
merge-sql: true
wall:
config:
multi-statement-allow: true

@ -59,7 +59,7 @@ spring:
time-zone: GMT+8
date-format: yyyy-MM-dd HH:mm:ss
profiles:
active: dev
active: devpg
# 文件上传
servlet:
multipart:

@ -37,8 +37,8 @@
AND q.content LIKE concat('%',#{content},'%')
</if>
</trim>
GROUP BY q.id ORDER BY q.update_time DESC
GROUP BY q.id,q.qu_type,q.levels,q.image,q.content,q.create_time,
q.update_time,q.remark,q.analysis ORDER BY q.update_time DESC
</select>

@ -25,24 +25,24 @@
</resultMap>
<sql id="selectMenuVo">
select menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, ifnull(perms,'') as perms, icon, create_by, create_time
select menu_id, menu_name, parent_id, order_num, url, target, menu_type, visible, is_refresh, COALESCE(perms,'') as perms, icon, create_by, create_time
from sys_menu
</sql>
<select id="selectMenusByUserId" parameterType="Long" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.url, m.visible, m.is_refresh, ifnull(m.perms,'') as perms, m.target, m.menu_type, m.icon, m.order_num, m.create_time
select distinct m.menu_id, m.parent_id, m.menu_name, m.url, m.visible, m.is_refresh, COALESCE(m.perms,'') as perms, m.target, 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
where ur.user_id = #{userId} and m.menu_type in ('M', 'C') and m.visible = 0 AND ro.status = 0
where ur.user_id = #{userId} and m.menu_type in ('M', 'C') and m.visible = '0' AND ro.status = '0'
order by m.parent_id, m.order_num
</select>
<select id="selectMenuNormalAll" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.url, m.visible, m.is_refresh, ifnull(m.perms,'') as perms, m.target, m.menu_type, m.icon, m.order_num, m.create_time
select distinct m.menu_id, m.parent_id, m.menu_name, m.url, m.visible, m.is_refresh, COALESCE(m.perms,'') as perms, m.target, m.menu_type, m.icon, m.order_num, m.create_time
from sys_menu m
where m.menu_type in ('M', 'C') and m.visible = 0
where m.menu_type in ('M', 'C') and m.visible = '0'
order by m.parent_id, m.order_num
</select>
@ -52,7 +52,7 @@
</select>
<select id="selectMenuAllByUserId" parameterType="Long" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.url, m.visible, m.is_refresh, ifnull(m.perms,'') as perms, m.target, m.menu_type, m.icon, m.order_num, m.create_time
select distinct m.menu_id, m.parent_id, m.menu_name, m.url, m.visible, m.is_refresh, COALESCE(m.perms,'') as perms, m.target, 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
@ -78,7 +78,7 @@
</select>
<select id="selectMenuTree" parameterType="Long" resultType="String">
select concat(m.menu_id, ifnull(m.perms,'')) as perms
select concat(m.menu_id, COALESCE(m.perms,'')) as perms
from sys_menu m
left join sys_role_menu rm on m.menu_id = rm.menu_id
where rm.role_id = #{roleId}
@ -99,7 +99,7 @@
</select>
<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
select distinct m.menu_id, m.parent_id, m.menu_name, m.url, m.visible, m.is_refresh, ifnull(m.perms,'') as perms, m.target, m.menu_type, m.icon, m.order_num, m.create_time
select distinct m.menu_id, m.parent_id, m.menu_name, m.url, m.visible, m.is_refresh, COALESCE(m.perms,'') as perms, m.target, 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

@ -317,12 +317,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectCountUser" resultType="com.ruoyi.system.domain.count.UserCountDTO">
SELECT
SUM (CASE WHEN examine = 2 THEN 1 ELSE 0 END) AS ydj,
SUM (CASE WHEN examine = 3 THEN 1 ELSE 0 END) AS ysb,
SUM (CASE WHEN examine = 0 THEN 1 ELSE 0 END) AS ysh,
(SELECT SUM (CASE WHEN leavestate = 1 THEN 1 ELSE 0 END)
SUM (CASE WHEN examine = '2' THEN 1 ELSE 0 END) AS ydj,
SUM (CASE WHEN examine = '3' THEN 1 ELSE 0 END) AS ysb,
SUM (CASE WHEN examine = '0' THEN 1 ELSE 0 END) AS ysh,
(SELECT SUM (CASE WHEN leavestate = '1' THEN 1 ELSE 0 END)
FROM td_leave t) as ylz,
(SELECT SUM (CASE WHEN leavestate = 2 THEN 1 ELSE 0 END)
(SELECT SUM (CASE WHEN leavestate = '2' THEN 1 ELSE 0 END)
FROM td_leave t) as ylg
FROM ${prefix}sys_user s
</select>
@ -330,9 +330,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectCountSmUser" resultType="com.ruoyi.system.domain.count.UserSmCountDTO">
SELECT
SUM (CASE WHEN shemichengdu = 0 THEN 1 ELSE 0 END) AS yb,
SUM (CASE WHEN shemichengdu = 1 THEN 1 ELSE 0 END) AS zy,
SUM (CASE WHEN shemichengdu = 2 THEN 1 ELSE 0 END) AS hx
SUM (CASE WHEN shemichengdu = '0' THEN 1 ELSE 0 END) AS yb,
SUM (CASE WHEN shemichengdu = '1' THEN 1 ELSE 0 END) AS zy,
SUM (CASE WHEN shemichengdu = '2' THEN 1 ELSE 0 END) AS hx
from ${prefix}sys_user where status='0' and del_flag='0'
</select>

@ -5,7 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.system.mapper.SysUserOnlineMapper">
<resultMap type="SysUserOnline" id="SysUserOnlineResult">
<id property="sessionId" column="sessionId" />
<id property="sessionId" column="session_id" />
<result property="loginName" column="login_name" />
<result property="deptName" column="dept_name" />
<result property="ipaddr" column="ipaddr" />
@ -19,17 +19,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectOnlineVo">
select sessionId, login_name, dept_name, ipaddr, login_location, browser, os, status, start_timestamp, last_access_time, expire_time
select session_id, login_name, dept_name, ipaddr, login_location, browser, os, status, start_timestamp, last_access_time, expire_time
from sys_user_online
</sql>
<select id="selectOnlineById" parameterType="String" resultMap="SysUserOnlineResult">
<include refid="selectOnlineVo"/>
where sessionId = #{sessionId}
where session_id = #{sessionId}
</select>
<insert id="saveOnline" parameterType="SysUserOnline">
insert into sys_user_online(sessionId, login_name, dept_name, ipaddr, login_location, browser, os, status, start_timestamp, last_access_time, expire_time)
insert into sys_user_online(session_id, login_name, dept_name, ipaddr, login_location, browser, os, status, start_timestamp, last_access_time, expire_time)
values (#{sessionId}, #{loginName}, #{deptName}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{status}, #{startTimestamp}, #{lastAccessTime}, #{expireTime})
</insert>
@ -47,11 +47,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="lastAccessTime != null ">last_access_time = #{lastAccessTime},</if>
<if test="expireTime != null ">expire_time = #{expireTime},</if>
</set>
where sessionId = #{sessionId}
where session_id = #{sessionId}
</update>
<delete id="deleteOnlineById" parameterType="String">
delete from sys_user_online where sessionId = #{sessionId}
delete from sys_user_online where session_id = #{sessionId}
</delete>
<select id="selectUserOnlineList" parameterType="SysUserOnline" resultMap="SysUserOnlineResult">

@ -38,7 +38,7 @@
<result property="destoryStand" column="destory_stand" jdbcType="VARCHAR"/>
<result property="issuedDept" column="issued_dept" jdbcType="VARCHAR"/>
<result property="expirationTime" column="expiration_time" jdbcType="VARCHAR"/>
<result property="mentsendTime" column="mentSend_time" jdbcType="TIMESTAMP"/>
<result property="mentsendTime" column="mentsend_time" jdbcType="TIMESTAMP"/>
<result property="reclaimTime" column="reclaim_time" jdbcType="TIMESTAMP"/>
</resultMap>
@ -54,7 +54,7 @@
update_time,remark,carrier_name,
area_city,area_district,maintain_stand,
destory_stand,issued_dept,expiration_time,
mentSend_time,reclaim_time
mentsend_time,reclaim_time
</sql>
<select id="selectTdCarrierList" resultType="com.ruoyi.system.domain.carrier.TdCarrierIssued">
select <include refid="Base_Column_List"/> from td_carrier_issued
@ -112,7 +112,7 @@
<if test="areaDistrict!=null and areaDistrict!=''">
AND area_district = #{areaDistrict}
</if>
AND status in (1,2)
AND status in ('1','2')
</trim>
ORDER BY create_time DESC
</select>
@ -172,7 +172,7 @@
<if test="areaDistrict!=null and areaDistrict!=''">
AND area_district = #{areaDistrict}
</if>
AND status in (3,4)
AND status in ('3','4')
</trim>
ORDER BY create_time DESC

@ -18,9 +18,9 @@
<result property="receivingUnits" column="receiving_units" jdbcType="VARCHAR"/>
<result property="receivingTime" column="receiving_time" jdbcType="TIMESTAMP"/>
<result property="receivingUser" column="receiving_user" jdbcType="VARCHAR"/>
<result property="issuingUnit" column="Issuing_unit" jdbcType="VARCHAR"/>
<result property="issuingTime" column="Issuing_time" jdbcType="TIMESTAMP"/>
<result property="issuingUser" column="Issuing_user" jdbcType="VARCHAR"/>
<result property="issuingUnit" column="issuing_unit" jdbcType="VARCHAR"/>
<result property="issuingTime" column="issuing_time" jdbcType="TIMESTAMP"/>
<result property="issuingUser" column="issuing_user" jdbcType="VARCHAR"/>
<result property="deliveryMethod" column="delivery_method" jdbcType="VARCHAR"/>
<result property="carrierVehicle" column="carrier_vehicle" jdbcType="VARCHAR"/>
<result property="mentsUse" column="ments_use" jdbcType="VARCHAR"/>
@ -52,7 +52,7 @@
carrier_extent,carrier_alliance,carrier_secret,
carrier_number,carrier_term,carrier_content,
receiving_units,receiving_time,receiving_user,
Issuing_unit,Issuing_time,Issuing_user,
issuing_unit,issuing_time,issuing_user,
delivery_method,carrier_vehicle,ments_use,
ments_time,usage_user,save_location,
location_require,maintain_depart,maintain_user,

@ -108,7 +108,7 @@
from td_check_report
</select>
<select id="countSecretsWxMonth" resultType="java.lang.Double" parameterType="PropertyManagerDTO">
SELECT MAX(CAST(percentage_score AS DOUBLE)) as percentageScore from td_check_report t where t.create_time &gt;= #{minDayTime}
SELECT MAX(CAST(percentage_score AS DOUBLE PRECISION)) as percentageScore from td_check_report t where t.create_time &gt;= #{minDayTime}
AND t.create_time &lt;= #{maxDayTime} limit 1
</select>

@ -5,61 +5,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.system.mapper.TdIndentureMapper">
<resultMap type="TdIndenture" id="TdIndentureResult">
<result property="indentureId" column="INDENTURE_ID" />
<result property="indentureName" column="INDENTURE_NAME" />
<result property="indentureAddress" column="INDENTURE_ADDRESS" />
<result property="indenturePhone" column="INDENTURE_PHONE" />
<result property="indentureMobile" column="INDENTURE_MOBILE" />
<result property="indentureLinkman" column="INDENTURE_LINKMAN" />
<result property="linkmanPhone" column="LINKMAN_PHONE" />
<result property="linkmanMobile" column="LINKMAN_MOBILE" />
<result property="indentureState" column="INDENTURE_STATE" />
<result property="remark" column="REMARK" />
<result property="createStaffid" column="CREATE_STAFFID" />
<result property="createDate" column="CREATE_DATE" />
<result property="indentureId" column="indenture_id" />
<result property="indentureName" column="indenture_name" />
<result property="indentureAddress" column="indenture_address" />
<result property="indenturePhone" column="indenture_phone" />
<result property="indentureMobile" column="indenture_mobile" />
<result property="indentureLinkman" column="indenture_linkman" />
<result property="linkmanPhone" column="linkman_phone" />
<result property="linkmanMobile" column="linkman_mobile" />
<result property="indentureState" column="indenture_state" />
<result property="remark" column="remark" />
<result property="createStaffid" column="create_staffid" />
<result property="createDate" column="create_date" />
</resultMap>
<sql id="selectTdIndentureVo">
select INDENTURE_ID, INDENTURE_NAME, INDENTURE_ADDRESS, INDENTURE_PHONE, INDENTURE_MOBILE, INDENTURE_LINKMAN, LINKMAN_PHONE, LINKMAN_MOBILE, INDENTURE_STATE, REMARK, CREATE_STAFFID, CREATE_DATE from td_indenture
select indenture_id, indenture_name, indenture_address, indenture_phone, indenture_mobile, indenture_linkman, linkman_phone, linkman_mobile, indenture_state, remark, create_staffid, create_date from td_indenture
</sql>
<select id="selectTdIndentureList" parameterType="TdIndenture" resultMap="TdIndentureResult">
<include refid="selectTdIndentureVo"/>
<where>
<if test="indentureName != null and indentureName != ''"> and INDENTURE_NAME like concat('%', #{indentureName}, '%')</if>
<if test="indentureAddress != null and indentureAddress != ''"> and INDENTURE_ADDRESS = #{indentureAddress}</if>
<if test="indenturePhone != null and indenturePhone != ''"> and INDENTURE_PHONE = #{indenturePhone}</if>
<if test="indentureMobile != null and indentureMobile != ''"> and INDENTURE_MOBILE = #{indentureMobile}</if>
<if test="indentureLinkman != null and indentureLinkman != ''"> and INDENTURE_LINKMAN = #{indentureLinkman}</if>
<if test="linkmanPhone != null and linkmanPhone != ''"> and LINKMAN_PHONE = #{linkmanPhone}</if>
<if test="linkmanMobile != null and linkmanMobile != ''"> and LINKMAN_MOBILE = #{linkmanMobile}</if>
<if test="indentureState != null and indentureState != ''"> and INDENTURE_STATE = #{indentureState}</if>
<if test="remark != null and REMARK != ''"> and REMARK = #{remark}</if>
<if test="createStaffid != null and createStaffid != ''"> and CREATE_STAFFID = #{createStaffid}</if>
<if test="createDate != null "> and CREATE_DATE = #{createDate}</if>
<if test="indentureName != null and indentureName != ''"> and indenture_name like concat('%', #{indentureName}, '%')</if>
<if test="indentureAddress != null and indentureAddress != ''"> and indenture_address = #{indentureAddress}</if>
<if test="indenturePhone != null and indenturePhone != ''"> and indenture_phone = #{indenturePhone}</if>
<if test="indentureMobile != null and indentureMobile != ''"> and indenture_mobile = #{indentureMobile}</if>
<if test="indentureLinkman != null and indentureLinkman != ''"> and indenture_linkman = #{indentureLinkman}</if>
<if test="linkmanPhone != null and linkmanPhone != ''"> and linkman_phone = #{linkmanPhone}</if>
<if test="linkmanMobile != null and linkmanMobile != ''"> and linkman_mobile = #{linkmanMobile}</if>
<if test="indentureState != null and indentureState != ''"> and indenture_state = #{indentureState}</if>
<if test="remark != null and REMARK != ''"> and remark = #{remark}</if>
<if test="createStaffid != null and createStaffid != ''"> and create_staffid = #{createStaffid}</if>
<if test="createDate != null "> and create_date = #{createDate}</if>
</where>
</select>
<select id="selectTdIndentureByIndentureId" parameterType="String" resultMap="TdIndentureResult">
<include refid="selectTdIndentureVo"/>
where INDENTURE_ID = #{indentureId}
where indenture_id = #{indentureId}
</select>
<insert id="insertTdIndenture" parameterType="TdIndenture">
insert into td_indenture
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="indentureId != null">INDENTURE_ID,</if>
<if test="indentureName != null">INDENTURE_NAME,</if>
<if test="indentureAddress != null">INDENTURE_ADDRESS,</if>
<if test="indenturePhone != null">INDENTURE_PHONE,</if>
<if test="indentureMobile != null">INDENTURE_MOBILE,</if>
<if test="indentureLinkman != null">INDENTURE_LINKMAN,</if>
<if test="linkmanPhone != null">LINKMAN_PHONE,</if>
<if test="linkmanMobile != null">LINKMAN_MOBILE,</if>
<if test="indentureState != null">INDENTURE_STATE,</if>
<if test="remark != null">REMARK,</if>
<if test="createStaffid != null">CREATE_STAFFID,</if>
<if test="createDate != null">CREATE_DATE,</if>
<if test="indentureId != null">indenture_id,</if>
<if test="indentureName != null">indenture_name,</if>
<if test="indentureAddress != null">indenture_address,</if>
<if test="indenturePhone != null">indenture_phone,</if>
<if test="indentureMobile != null">indenture_mobile,</if>
<if test="indentureLinkman != null">indenture_linkman,</if>
<if test="linkmanPhone != null">linkman_phone,</if>
<if test="linkmanMobile != null">linkman_mobile,</if>
<if test="indentureState != null">indenture_state,</if>
<if test="remark != null">remark,</if>
<if test="createStaffid != null">create_staffid,</if>
<if test="createDate != null">create_date,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="indentureId != null">#{indentureId},</if>
@ -80,27 +80,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateTdIndenture" parameterType="TdIndenture">
update td_indenture
<trim prefix="SET" suffixOverrides=",">
<if test="indentureName != null">INDENTURE_NAME = #{indentureName},</if>
<if test="indentureAddress != null">INDENTURE_ADDRESS = #{indentureAddress},</if>
<if test="indenturePhone != null">INDENTURE_PHONE = #{indenturePhone},</if>
<if test="indentureMobile != null">INDENTURE_MOBILE = #{indentureMobile},</if>
<if test="indentureLinkman != null">INDENTURE_LINKMAN = #{indentureLinkman},</if>
<if test="linkmanPhone != null">LINKMAN_PHONE = #{linkmanPhone},</if>
<if test="linkmanMobile != null">LINKMAN_MOBILE = #{linkmanMobile},</if>
<if test="indentureState != null">INDENTURE_STATE = #{indentureState},</if>
<if test="remark != null">REMARK = #{remark},</if>
<if test="createStaffid != null">CREATE_STAFFID = #{createStaffid},</if>
<if test="createDate != null">CREATE_DATE = #{createDate},</if>
<if test="indentureName != null">indenture_name = #{indentureName},</if>
<if test="indentureAddress != null">indenture_address = #{indentureAddress},</if>
<if test="indenturePhone != null">indenture_phone = #{indenturePhone},</if>
<if test="indentureMobile != null">indenture_mobile = #{indentureMobile},</if>
<if test="indentureLinkman != null">indenture_linkman = #{indentureLinkman},</if>
<if test="linkmanPhone != null">linkman_phone = #{linkmanPhone},</if>
<if test="linkmanMobile != null">linkman_mobile = #{linkmanMobile},</if>
<if test="indentureState != null">indenture_state = #{indentureState},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createStaffid != null">create_staffid = #{createStaffid},</if>
<if test="createDate != null">create_date = #{createDate},</if>
</trim>
where INDENTURE_ID = #{indentureId}
where indenture_id = #{indentureId}
</update>
<delete id="deleteTdIndentureByIndentureId" parameterType="String">
delete from td_indenture where INDENTURE_ID = #{indentureId}
delete from td_indenture where indenture_id = #{indentureId}
</delete>
<delete id="deleteTdIndentureByIndentureIds" parameterType="String">
delete from td_indenture where INDENTURE_ID in
delete from td_indenture where indenture_id in
<foreach item="indentureId" collection="array" open="(" separator="," close=")">
#{indentureId}
</foreach>

@ -203,14 +203,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectCountBF" resultType="com.ruoyi.system.domain.count.PropertyStateCountDTO">
SELECT
SUM (CASE WHEN destory_type = 1 THEN 1 ELSE 0 END) AS ybf,
SUM (CASE WHEN destory_type = 0 THEN 1 ELSE 0 END) AS wbf
SUM (CASE WHEN destory_type = '1' THEN 1 ELSE 0 END) AS ybf,
SUM (CASE WHEN destory_type = '0' THEN 1 ELSE 0 END) AS wbf
FROM td_property_info
</select>
<select id="selectCountXH" resultType="com.ruoyi.system.domain.count.PropertyDesCountDTO">
SELECT
SUM (CASE WHEN destory_state = 1 THEN 1 ELSE 0 END) AS yxh,
SUM (CASE WHEN destory_state = '1' THEN 1 ELSE 0 END) AS yxh,
SUM (CASE WHEN destory_state='' THEN 1 ELSE 0 END) AS wxh
FROM td_property_info
</select>

Loading…
Cancel
Save