commit
b3301ac65a
@ -1 +1 @@
|
||||
server:
port: 1204
spring:
datasource:
dynamic:
primary: mysql #设置默认的数据源或者数据源组,默认值即为master
strict: false #设置严格模式,默认false不启动. 启动后再为匹配到指定数据源时候回抛出异常,不启动会使用默认数据源.
datasource:
oracleSydz:
url: jdbc:mysql://121.41.91.94:12036/yhzafk?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=GMT
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: '!QAZ1qaz'
mysql:
url: jdbc:mysql://121.41.91.94:12036/yhzafk?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=GMT
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: '!QAZ1qaz'
mysqlSy:
url: jdbc:mysql://121.41.91.94:12036/watu3?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=GMT
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: '!QAZ1qaz'
mybatis-plus:
|
||||
server:
port: 1204
spring:
datasource:
dynamic:
primary: mysql #设置默认的数据源或者数据源组,默认值即为master
strict: false #设置严格模式,默认false不启动. 启动后再为匹配到指定数据源时候回抛出异常,不启动会使用默认数据源.
datasource:
oracleSydz:
url: jdbc:mysql://121.41.91.94:12036/yhzafk?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=GMT
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: '!QAZ1qaz'
mysql:
url: jdbc:mysql://121.41.91.94:12036/yhzafk?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=GMT
url: jdbc:mysql://121.41.91.94:12036/yhzafk?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=GMT&connectTimeout=150000
username: root
password: '!QAZ1qaz'
password: '!QAZ1qaz'
url: jdbc:mysql://121.41.91.94:12036/watu3?useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=GMT
mybatis-plus:
driver-class-name: com.mysql.cj.jdbc.Driver
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mapper-locations:
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
driver-class-name: com.mysql.cj.jdbc.Driver
password: '!QAZ1qaz'
configuration:
map-underscore-to-camel-case: true
mapper-locations: mybatis/**/*Mapper.xml
typeAliasesPackage: com.ssf.mysqloracletest.**.domain
logging:
driver-class-name: com.mysql.cj.jdbc.Driver
mybatis-plus:
username: root
username: root
|
@ -0,0 +1,159 @@
|
||||
<?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.ssf.mysqloracletest.mapper.MetaActualUserInfoMapper">
|
||||
|
||||
<resultMap type="com.ssf.mysqloracletest.domain.MetaActualUserInfo" id="MetaActualUserInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userPic" column="user_pic" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="idCard" column="id_card" />
|
||||
<result property="sex" column="sex" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="landline" column="landline" />
|
||||
<result property="houseHoldRegister" column="house_hold_register" />
|
||||
<result property="houseHoldAddress" column="house_hold_address" />
|
||||
<result property="habitationAddress" column="habitation_address" />
|
||||
<result property="policeStationCode" column="police_station_code" />
|
||||
<result property="policeStationName" column="police_station_name" />
|
||||
<result property="policeDistrictCode" column="police_district_code" />
|
||||
<result property="policeDistrictName" column="police_district_name" />
|
||||
<result property="managementStatus" column="management_status" />
|
||||
<result property="homeId" column="home_id" />
|
||||
<result property="homeCode" column="home_code" />
|
||||
<result property="accountNumber" column="account_number" />
|
||||
<result property="metaCreateTime" column="meta_create_time" />
|
||||
<result property="metaUpdateTime" column="meta_update_time" />
|
||||
<result property="actualUserType" column="actual_user_type" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMetaActualUserInfoVo">
|
||||
select id, user_pic, user_name, id_card, sex, phone, landline, house_hold_register, house_hold_address, habitation_address, police_station_code, police_station_name, police_district_code, police_district_name, management_status, home_id, home_code, account_number, meta_create_time, meta_update_time, actual_user_type from meta_actual_user_info
|
||||
</sql>
|
||||
|
||||
<select id="selectMetaActualUserInfoList" parameterType="MetaActualUserInfo" resultMap="MetaActualUserInfoResult">
|
||||
<include refid="selectMetaActualUserInfoVo"/>
|
||||
<where>
|
||||
<if test="userPic != null and userPic != ''"> and user_pic = #{userPic}</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
|
||||
<if test="sex != null "> and sex = #{sex}</if>
|
||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||||
<if test="landline != null and landline != ''"> and landline = #{landline}</if>
|
||||
<if test="houseHoldRegister != null and houseHoldRegister != ''"> and house_hold_register = #{houseHoldRegister}</if>
|
||||
<if test="houseHoldAddress != null and houseHoldAddress != ''"> and house_hold_address = #{houseHoldAddress}</if>
|
||||
<if test="habitationAddress != null and habitationAddress != ''"> and habitation_address = #{habitationAddress}</if>
|
||||
<if test="policeStationCode != null and policeStationCode != ''"> and police_station_code = #{policeStationCode}</if>
|
||||
<if test="policeStationName != null and policeStationName != ''"> and police_station_name like concat('%', #{policeStationName}, '%')</if>
|
||||
<if test="policeDistrictCode != null and policeDistrictCode != ''"> and police_district_code = #{policeDistrictCode}</if>
|
||||
<if test="policeDistrictName != null and policeDistrictName != ''"> and police_district_name like concat('%', #{policeDistrictName}, '%')</if>
|
||||
<if test="managementStatus != null and managementStatus != ''"> and management_status = #{managementStatus}</if>
|
||||
<if test="homeId != null and homeId != ''"> and home_id = #{homeId}</if>
|
||||
<if test="homeCode != null and homeCode != ''"> and home_code = #{homeCode}</if>
|
||||
<if test="accountNumber != null and accountNumber != ''"> and account_number = #{accountNumber}</if>
|
||||
<if test="metaCreateTime != null and metaCreateTime != ''"> and meta_create_time = #{metaCreateTime}</if>
|
||||
<if test="metaUpdateTime != null and metaUpdateTime != ''"> and meta_update_time = #{metaUpdateTime}</if>
|
||||
<if test="actualUserType != null "> and actual_user_type = #{actualUserType}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectMetaActualUserInfoById" parameterType="Long" resultMap="MetaActualUserInfoResult">
|
||||
<include refid="selectMetaActualUserInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertMetaActualUserInfo" parameterType="MetaActualUserInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into meta_actual_user_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userPic != null">user_pic,</if>
|
||||
<if test="userName != null">user_name,</if>
|
||||
<if test="idCard != null">id_card,</if>
|
||||
<if test="sex != null">sex,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="landline != null">landline,</if>
|
||||
<if test="houseHoldRegister != null">house_hold_register,</if>
|
||||
<if test="houseHoldAddress != null">house_hold_address,</if>
|
||||
<if test="habitationAddress != null">habitation_address,</if>
|
||||
<if test="policeStationCode != null">police_station_code,</if>
|
||||
<if test="policeStationName != null">police_station_name,</if>
|
||||
<if test="policeDistrictCode != null">police_district_code,</if>
|
||||
<if test="policeDistrictName != null">police_district_name,</if>
|
||||
<if test="managementStatus != null">management_status,</if>
|
||||
<if test="homeId != null">home_id,</if>
|
||||
<if test="homeCode != null">home_code,</if>
|
||||
<if test="accountNumber != null">account_number,</if>
|
||||
<if test="metaCreateTime != null">meta_create_time,</if>
|
||||
<if test="metaUpdateTime != null">meta_update_time,</if>
|
||||
<if test="actualUserType != null">actual_user_type,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userPic != null">#{userPic},</if>
|
||||
<if test="userName != null">#{userName},</if>
|
||||
<if test="idCard != null">#{idCard},</if>
|
||||
<if test="sex != null">#{sex},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="landline != null">#{landline},</if>
|
||||
<if test="houseHoldRegister != null">#{houseHoldRegister},</if>
|
||||
<if test="houseHoldAddress != null">#{houseHoldAddress},</if>
|
||||
<if test="habitationAddress != null">#{habitationAddress},</if>
|
||||
<if test="policeStationCode != null">#{policeStationCode},</if>
|
||||
<if test="policeStationName != null">#{policeStationName},</if>
|
||||
<if test="policeDistrictCode != null">#{policeDistrictCode},</if>
|
||||
<if test="policeDistrictName != null">#{policeDistrictName},</if>
|
||||
<if test="managementStatus != null">#{managementStatus},</if>
|
||||
<if test="homeId != null">#{homeId},</if>
|
||||
<if test="homeCode != null">#{homeCode},</if>
|
||||
<if test="accountNumber != null">#{accountNumber},</if>
|
||||
<if test="metaCreateTime != null">#{metaCreateTime},</if>
|
||||
<if test="metaUpdateTime != null">#{metaUpdateTime},</if>
|
||||
<if test="actualUserType != null">#{actualUserType},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMetaActualUserInfo" parameterType="MetaActualUserInfo">
|
||||
update meta_actual_user_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userPic != null">user_pic = #{userPic},</if>
|
||||
<if test="userName != null">user_name = #{userName},</if>
|
||||
<if test="idCard != null">id_card = #{idCard},</if>
|
||||
<if test="sex != null">sex = #{sex},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="landline != null">landline = #{landline},</if>
|
||||
<if test="houseHoldRegister != null">house_hold_register = #{houseHoldRegister},</if>
|
||||
<if test="houseHoldAddress != null">house_hold_address = #{houseHoldAddress},</if>
|
||||
<if test="habitationAddress != null">habitation_address = #{habitationAddress},</if>
|
||||
<if test="policeStationCode != null">police_station_code = #{policeStationCode},</if>
|
||||
<if test="policeStationName != null">police_station_name = #{policeStationName},</if>
|
||||
<if test="policeDistrictCode != null">police_district_code = #{policeDistrictCode},</if>
|
||||
<if test="policeDistrictName != null">police_district_name = #{policeDistrictName},</if>
|
||||
<if test="managementStatus != null">management_status = #{managementStatus},</if>
|
||||
<if test="homeId != null">home_id = #{homeId},</if>
|
||||
<if test="homeCode != null">home_code = #{homeCode},</if>
|
||||
<if test="accountNumber != null">account_number = #{accountNumber},</if>
|
||||
<if test="metaCreateTime != null">meta_create_time = #{metaCreateTime},</if>
|
||||
<if test="metaUpdateTime != null">meta_update_time = #{metaUpdateTime},</if>
|
||||
<if test="actualUserType != null">actual_user_type = #{actualUserType},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMetaActualUserInfoById" parameterType="Long">
|
||||
delete from meta_actual_user_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMetaActualUserInfoByIds" parameterType="String">
|
||||
delete from meta_actual_user_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
|
||||
<select id="selectMetaActualUserInfoListByHomeId" parameterType="MetaActualUserInfo" resultMap="MetaActualUserInfoResult">
|
||||
<include refid="selectMetaActualUserInfoVo"/>
|
||||
where home_id is not null and account_number is null limit 200;
|
||||
</select>
|
||||
|
||||
</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.ssf.mysqloracletest.mapper.MetaRealEstateInfoMapper">
|
||||
|
||||
<resultMap type="com.ssf.mysqloracletest.domain.MetaRealEstateInfo" id="MetaRealEstateInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="homeId" column="home_id" />
|
||||
<result property="policeStationCode" column="police_station_code" />
|
||||
<result property="policeDistrictCode" column="police_district_code" />
|
||||
<result property="realEstateAddress" column="real_estate_address" />
|
||||
<result property="longitude" column="longitude" />
|
||||
<result property="latitude" column="latitude" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMetaRealEstateInfoVo">
|
||||
select id, home_id, police_station_code, police_district_code, real_estate_address, longitude, latitude from meta_real_estate_info
|
||||
</sql>
|
||||
|
||||
<select id="selectMetaRealEstateInfoList" parameterType="com.ssf.mysqloracletest.domain.MetaRealEstateInfo" resultMap="MetaRealEstateInfoResult">
|
||||
<include refid="selectMetaRealEstateInfoVo"/>
|
||||
<where>
|
||||
<if test="homeId != null and homeId != ''"> and home_id = #{homeId}</if>
|
||||
<if test="policeStationCode != null and policeStationCode != ''"> and police_station_code = #{policeStationCode}</if>
|
||||
<if test="policeDistrictCode != null and policeDistrictCode != ''"> and police_district_code = #{policeDistrictCode}</if>
|
||||
<if test="realEstateAddress != null and realEstateAddress != ''"> and real_estate_address = #{realEstateAddress}</if>
|
||||
<if test="longitude != null "> and longitude = #{longitude}</if>
|
||||
<if test="latitude != null "> and latitude = #{latitude}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getListByAddress" parameterType="com.ssf.mysqloracletest.domain.MetaRealEstateInfo" resultMap="MetaRealEstateInfoResult">
|
||||
<include refid="selectMetaRealEstateInfoVo"/>
|
||||
<where>
|
||||
<if test="homeId != null and homeId != ''"> and home_id = #{homeId}</if>
|
||||
<if test="policeStationCode != null and policeStationCode != ''"> and police_station_code = #{policeStationCode}</if>
|
||||
<if test="policeDistrictCode != null and policeDistrictCode != ''"> and police_district_code = #{policeDistrictCode}</if>
|
||||
<if test="realEstateAddress != null and realEstateAddress != ''"> and real_estate_address = #{realEstateAddress}</if>
|
||||
<if test="longitude != null "> and longitude = #{longitude}</if>
|
||||
<if test="latitude != null "> and latitude = #{latitude}</if>
|
||||
</where>
|
||||
limit 1;
|
||||
</select>
|
||||
|
||||
<select id="selectMetaRealEstateInfoById" parameterType="Long" resultMap="MetaRealEstateInfoResult">
|
||||
<include refid="selectMetaRealEstateInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertMetaRealEstateInfo" parameterType="com.ssf.mysqloracletest.domain.MetaRealEstateInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into meta_real_estate_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="homeId != null">home_id,</if>
|
||||
<if test="policeStationCode != null">police_station_code,</if>
|
||||
<if test="policeDistrictCode != null">police_district_code,</if>
|
||||
<if test="realEstateAddress != null">real_estate_address,</if>
|
||||
<if test="longitude != null">longitude,</if>
|
||||
<if test="latitude != null">latitude,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="homeId != null">#{homeId},</if>
|
||||
<if test="policeStationCode != null">#{policeStationCode},</if>
|
||||
<if test="policeDistrictCode != null">#{policeDistrictCode},</if>
|
||||
<if test="realEstateAddress != null">#{realEstateAddress},</if>
|
||||
<if test="longitude != null">#{longitude},</if>
|
||||
<if test="latitude != null">#{latitude},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateMetaRealEstateInfo" parameterType="com.ssf.mysqloracletest.domain.MetaRealEstateInfo">
|
||||
update meta_real_estate_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="homeId != null">home_id = #{homeId},</if>
|
||||
<if test="policeStationCode != null">police_station_code = #{policeStationCode},</if>
|
||||
<if test="policeDistrictCode != null">police_district_code = #{policeDistrictCode},</if>
|
||||
<if test="realEstateAddress != null">real_estate_address = #{realEstateAddress},</if>
|
||||
<if test="longitude != null">longitude = #{longitude},</if>
|
||||
<if test="latitude != null">latitude = #{latitude},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteMetaRealEstateInfoById" parameterType="Long">
|
||||
delete from meta_real_estate_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteMetaRealEstateInfoByIds" parameterType="String">
|
||||
delete from meta_real_estate_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in new issue