提交 bb591cad 编写于 作者: rushui.chen's avatar rushui.chen

20200106 删除定时任务代码

上级 93b66cdb
流水线 #20191 已失败 于阶段
in 0 second
package com.pica.cloud.account.account.server.job; package com.pica.cloud.account.account.server.job;
import com.pica.cloud.account.account.server.mapper.HospitalMapper;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.log.XxlJobLogger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/** /**
* Created on 2019/12/16 17:53 * Created on 2019/12/16 17:53
* author:crs * author:crs
* Description:记录doctor修改记录日志 * Description:记录doctor修改记录日志
*/ */
@JobHandler(value = "HospitalLogHandler") //@JobHandler(value = "HospitalLogHandler")
@Component //@Component
public class HospitalLogHandler extends IJobHandler { //public class HospitalLogHandler extends IJobHandler {
//
@Autowired // @Autowired
private HospitalMapper hospitalMapper; // private HospitalMapper hospitalMapper;
//
@Override // @Override
public ReturnT<String> execute(String s) throws Exception { // public ReturnT<String> execute(String s) throws Exception {
XxlJobLogger.log("hospitalLogRecord start-----"); // XxlJobLogger.log("hospitalLogRecord start-----");
Integer rows = hospitalMapper.updateDoctorModifyRecord(); // Integer rows = hospitalMapper.updateDoctorModifyRecord();
XxlJobLogger.log("hospitalLogRecord end-----"+rows); // XxlJobLogger.log("hospitalLogRecord end-----"+rows);
return SUCCESS; // return SUCCESS;
} // }
} //}
package com.pica.cloud.account.account.server.job; package com.pica.cloud.account.account.server.job;
import com.pica.cloud.account.account.server.mapper.PermissionDoctorRoleMapper;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.log.XxlJobLogger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/** /**
* Created on 2019/12/16 17:53 * Created on 2019/12/16 17:53
* author:crs * author:crs
......
...@@ -86,16 +86,7 @@ public interface DoctorMapper { ...@@ -86,16 +86,7 @@ public interface DoctorMapper {
PICAPDoctor queryDoctor(long doctorId); PICAPDoctor queryDoctor(long doctorId);
void updateDeleteByPrimaryKey(@Param("map") HashMap<String, Long> map); void updateDeleteByPrimaryKey(@Param("map") HashMap<String, Long> map);
/**
* 通过手机号获取用户id
*
* @param mobile
* @return
*/
//Long selectDoctorIdByMobile(String mobile);
Integer getAcctIdByDoctorId(long id); Integer getAcctIdByDoctorId(long id);
......
package com.pica.cloud.account.account.server.mapper;
import com.pica.cloud.account.account.server.entity.Hospital;
public interface HospitalMapper {
int deleteByPrimaryKey(Integer id);
int insert(Hospital record);
int insertSelective(Hospital record);
Hospital selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(Hospital record);
int updateByPrimaryKey(Hospital record);
Integer updateDoctorModifyRecord();
}
\ No newline at end of file
package com.pica.cloud.account.account.server.mapper;
import com.pica.cloud.account.account.server.entity.PermissionDoctorRole;
public interface PermissionDoctorRoleMapper {
int deleteByPrimaryKey(Long id);
int insert(PermissionDoctorRole record);
int insertSelective(PermissionDoctorRole record);
PermissionDoctorRole selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(PermissionDoctorRole record);
int updateByPrimaryKey(PermissionDoctorRole record);
/**
* 记录用户权限修改记录
*
* @return
*/
Integer updatePermissionModifyRecord();
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.pica.cloud.account.account.server.mapper.HospitalMapper" >
<resultMap id="BaseResultMap" type="com.pica.cloud.account.account.server.entity.Hospital" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="province_id" property="provinceId" jdbcType="INTEGER" />
<result column="province_name" property="provinceName" jdbcType="VARCHAR" />
<result column="city_id" property="cityId" jdbcType="BIGINT" />
<result column="city_name" property="cityName" jdbcType="VARCHAR" />
<result column="county_id" property="countyId" jdbcType="BIGINT" />
<result column="county_name" property="countyName" jdbcType="VARCHAR" />
<result column="town_id" property="townId" jdbcType="BIGINT" />
<result column="town_name" property="townName" jdbcType="VARCHAR" />
<result column="village_id" property="villageId" jdbcType="BIGINT" />
<result column="village_name" property="villageName" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="hospital_address" property="hospitalAddress" jdbcType="VARCHAR" />
<result column="type" property="type" jdbcType="INTEGER" />
<result column="org_type" property="orgType" jdbcType="INTEGER" />
<result column="level_grade" property="levelGrade" jdbcType="INTEGER" />
<result column="contacts" property="contacts" jdbcType="VARCHAR" />
<result column="tel" property="tel" jdbcType="VARCHAR" />
<result column="source_type" property="sourceType" jdbcType="INTEGER" />
<result column="enable" property="enable" jdbcType="INTEGER" />
<result column="delete_flag" property="deleteFlag" jdbcType="INTEGER" />
<result column="creat_id" property="creatId" jdbcType="INTEGER" />
<result column="creat_time" property="creatTime" jdbcType="TIMESTAMP" />
<result column="modify_id" property="modifyId" jdbcType="INTEGER" />
<result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP" />
<result column="hospital_statistics_type" property="hospitalStatisticsType" jdbcType="INTEGER" />
<result column="hospital_rank" property="hospitalRank" jdbcType="INTEGER" />
<result column="hospital_alias" property="hospitalAlias" jdbcType="VARCHAR" />
<result column="parent_id" property="parentId" jdbcType="INTEGER" />
<result column="hospital_class" property="hospitalClass" jdbcType="VARCHAR" />
<result column="hospital_level" property="hospitalLevel" jdbcType="VARCHAR" />
<result column="hospital_grade" property="hospitalGrade" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, province_id, province_name, city_id, city_name, county_id, county_name, town_id,
town_name, village_id, village_name, name, hospital_address, type, org_type, level_grade,
contacts, tel, source_type, enable, delete_flag, creat_id, creat_time, modify_id,
modify_time, hospital_statistics_type, hospital_rank, hospital_alias, parent_id,
hospital_class, hospital_level, hospital_grade
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from p_hospital
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from p_hospital
where id = #{id,jdbcType=INTEGER}
</delete>
<!--刷新hospital表的数据-->
<insert id="updateDoctorModifyRecord">
insert into log_p_hospital(`hospital_id`, `province_id`, `province_name`, `city_id`, `city_name`, `county_id`, `county_name`, `town_id`, `town_name`, `village_id`, `village_name`,
`name`, `hospital_address`, `type`, `org_type`, `level_grade`, `contacts`, `tel`, `source_type`, `enable`, `delete_flag`, `creat_id`, `creat_time`, `modify_id`, `modify_time`,
`hospital_statistics_type`, `hospital_rank`, `hospital_alias`, `parent_id`, `hospital_class`, `hospital_level`, `hospital_grade`)
SELECT * FROM p_hospital
where modify_time &gt; DATE_SUB(DATE_FORMAT(NOW(),'%Y-%m-%d %H:00:00'),INTERVAL 1 hour)
and modify_time &lt; DATE_FORMAT(NOW(), '%Y-%m-%d %H:00:00')
</insert>
<insert id="insert" parameterType="com.pica.cloud.account.account.server.entity.Hospital" >
insert into p_hospital (id, province_id, province_name,
city_id, city_name, county_id,
county_name, town_id, town_name,
village_id, village_name, name,
hospital_address, type, org_type,
level_grade, contacts, tel,
source_type, enable, delete_flag,
creat_id, creat_time, modify_id,
modify_time, hospital_statistics_type, hospital_rank,
hospital_alias, parent_id, hospital_class,
hospital_level, hospital_grade)
values (#{id,jdbcType=INTEGER}, #{provinceId,jdbcType=INTEGER}, #{provinceName,jdbcType=VARCHAR},
#{cityId,jdbcType=BIGINT}, #{cityName,jdbcType=VARCHAR}, #{countyId,jdbcType=BIGINT},
#{countyName,jdbcType=VARCHAR}, #{townId,jdbcType=BIGINT}, #{townName,jdbcType=VARCHAR},
#{villageId,jdbcType=BIGINT}, #{villageName,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{hospitalAddress,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{orgType,jdbcType=INTEGER},
#{levelGrade,jdbcType=INTEGER}, #{contacts,jdbcType=VARCHAR}, #{tel,jdbcType=VARCHAR},
#{sourceType,jdbcType=INTEGER}, #{enable,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
#{creatId,jdbcType=INTEGER}, #{creatTime,jdbcType=TIMESTAMP}, #{modifyId,jdbcType=INTEGER},
#{modifyTime,jdbcType=TIMESTAMP}, #{hospitalStatisticsType,jdbcType=INTEGER}, #{hospitalRank,jdbcType=INTEGER},
#{hospitalAlias,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER}, #{hospitalClass,jdbcType=VARCHAR},
#{hospitalLevel,jdbcType=VARCHAR}, #{hospitalGrade,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.pica.cloud.account.account.server.entity.Hospital" >
insert into p_hospital
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="provinceId != null" >
province_id,
</if>
<if test="provinceName != null" >
province_name,
</if>
<if test="cityId != null" >
city_id,
</if>
<if test="cityName != null" >
city_name,
</if>
<if test="countyId != null" >
county_id,
</if>
<if test="countyName != null" >
county_name,
</if>
<if test="townId != null" >
town_id,
</if>
<if test="townName != null" >
town_name,
</if>
<if test="villageId != null" >
village_id,
</if>
<if test="villageName != null" >
village_name,
</if>
<if test="name != null" >
name,
</if>
<if test="hospitalAddress != null" >
hospital_address,
</if>
<if test="type != null" >
type,
</if>
<if test="orgType != null" >
org_type,
</if>
<if test="levelGrade != null" >
level_grade,
</if>
<if test="contacts != null" >
contacts,
</if>
<if test="tel != null" >
tel,
</if>
<if test="sourceType != null" >
source_type,
</if>
<if test="enable != null" >
enable,
</if>
<if test="deleteFlag != null" >
delete_flag,
</if>
<if test="creatId != null" >
creat_id,
</if>
<if test="creatTime != null" >
creat_time,
</if>
<if test="modifyId != null" >
modify_id,
</if>
<if test="modifyTime != null" >
modify_time,
</if>
<if test="hospitalStatisticsType != null" >
hospital_statistics_type,
</if>
<if test="hospitalRank != null" >
hospital_rank,
</if>
<if test="hospitalAlias != null" >
hospital_alias,
</if>
<if test="parentId != null" >
parent_id,
</if>
<if test="hospitalClass != null" >
hospital_class,
</if>
<if test="hospitalLevel != null" >
hospital_level,
</if>
<if test="hospitalGrade != null" >
hospital_grade,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="provinceId != null" >
#{provinceId,jdbcType=INTEGER},
</if>
<if test="provinceName != null" >
#{provinceName,jdbcType=VARCHAR},
</if>
<if test="cityId != null" >
#{cityId,jdbcType=BIGINT},
</if>
<if test="cityName != null" >
#{cityName,jdbcType=VARCHAR},
</if>
<if test="countyId != null" >
#{countyId,jdbcType=BIGINT},
</if>
<if test="countyName != null" >
#{countyName,jdbcType=VARCHAR},
</if>
<if test="townId != null" >
#{townId,jdbcType=BIGINT},
</if>
<if test="townName != null" >
#{townName,jdbcType=VARCHAR},
</if>
<if test="villageId != null" >
#{villageId,jdbcType=BIGINT},
</if>
<if test="villageName != null" >
#{villageName,jdbcType=VARCHAR},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="hospitalAddress != null" >
#{hospitalAddress,jdbcType=VARCHAR},
</if>
<if test="type != null" >
#{type,jdbcType=INTEGER},
</if>
<if test="orgType != null" >
#{orgType,jdbcType=INTEGER},
</if>
<if test="levelGrade != null" >
#{levelGrade,jdbcType=INTEGER},
</if>
<if test="contacts != null" >
#{contacts,jdbcType=VARCHAR},
</if>
<if test="tel != null" >
#{tel,jdbcType=VARCHAR},
</if>
<if test="sourceType != null" >
#{sourceType,jdbcType=INTEGER},
</if>
<if test="enable != null" >
#{enable,jdbcType=INTEGER},
</if>
<if test="deleteFlag != null" >
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="creatId != null" >
#{creatId,jdbcType=INTEGER},
</if>
<if test="creatTime != null" >
#{creatTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyId != null" >
#{modifyId,jdbcType=INTEGER},
</if>
<if test="modifyTime != null" >
#{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="hospitalStatisticsType != null" >
#{hospitalStatisticsType,jdbcType=INTEGER},
</if>
<if test="hospitalRank != null" >
#{hospitalRank,jdbcType=INTEGER},
</if>
<if test="hospitalAlias != null" >
#{hospitalAlias,jdbcType=VARCHAR},
</if>
<if test="parentId != null" >
#{parentId,jdbcType=INTEGER},
</if>
<if test="hospitalClass != null" >
#{hospitalClass,jdbcType=VARCHAR},
</if>
<if test="hospitalLevel != null" >
#{hospitalLevel,jdbcType=VARCHAR},
</if>
<if test="hospitalGrade != null" >
#{hospitalGrade,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.pica.cloud.account.account.server.entity.Hospital" >
update p_hospital
<set >
<if test="provinceId != null" >
province_id = #{provinceId,jdbcType=INTEGER},
</if>
<if test="provinceName != null" >
province_name = #{provinceName,jdbcType=VARCHAR},
</if>
<if test="cityId != null" >
city_id = #{cityId,jdbcType=BIGINT},
</if>
<if test="cityName != null" >
city_name = #{cityName,jdbcType=VARCHAR},
</if>
<if test="countyId != null" >
county_id = #{countyId,jdbcType=BIGINT},
</if>
<if test="countyName != null" >
county_name = #{countyName,jdbcType=VARCHAR},
</if>
<if test="townId != null" >
town_id = #{townId,jdbcType=BIGINT},
</if>
<if test="townName != null" >
town_name = #{townName,jdbcType=VARCHAR},
</if>
<if test="villageId != null" >
village_id = #{villageId,jdbcType=BIGINT},
</if>
<if test="villageName != null" >
village_name = #{villageName,jdbcType=VARCHAR},
</if>
<if test="name != null" >
name = #{name,jdbcType=VARCHAR},
</if>
<if test="hospitalAddress != null" >
hospital_address = #{hospitalAddress,jdbcType=VARCHAR},
</if>
<if test="type != null" >
type = #{type,jdbcType=INTEGER},
</if>
<if test="orgType != null" >
org_type = #{orgType,jdbcType=INTEGER},
</if>
<if test="levelGrade != null" >
level_grade = #{levelGrade,jdbcType=INTEGER},
</if>
<if test="contacts != null" >
contacts = #{contacts,jdbcType=VARCHAR},
</if>
<if test="tel != null" >
tel = #{tel,jdbcType=VARCHAR},
</if>
<if test="sourceType != null" >
source_type = #{sourceType,jdbcType=INTEGER},
</if>
<if test="enable != null" >
enable = #{enable,jdbcType=INTEGER},
</if>
<if test="deleteFlag != null" >
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="creatId != null" >
creat_id = #{creatId,jdbcType=INTEGER},
</if>
<if test="creatTime != null" >
creat_time = #{creatTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyId != null" >
modify_id = #{modifyId,jdbcType=INTEGER},
</if>
<if test="modifyTime != null" >
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="hospitalStatisticsType != null" >
hospital_statistics_type = #{hospitalStatisticsType,jdbcType=INTEGER},
</if>
<if test="hospitalRank != null" >
hospital_rank = #{hospitalRank,jdbcType=INTEGER},
</if>
<if test="hospitalAlias != null" >
hospital_alias = #{hospitalAlias,jdbcType=VARCHAR},
</if>
<if test="parentId != null" >
parent_id = #{parentId,jdbcType=INTEGER},
</if>
<if test="hospitalClass != null" >
hospital_class = #{hospitalClass,jdbcType=VARCHAR},
</if>
<if test="hospitalLevel != null" >
hospital_level = #{hospitalLevel,jdbcType=VARCHAR},
</if>
<if test="hospitalGrade != null" >
hospital_grade = #{hospitalGrade,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.pica.cloud.account.account.server.entity.Hospital" >
update p_hospital
set province_id = #{provinceId,jdbcType=INTEGER},
province_name = #{provinceName,jdbcType=VARCHAR},
city_id = #{cityId,jdbcType=BIGINT},
city_name = #{cityName,jdbcType=VARCHAR},
county_id = #{countyId,jdbcType=BIGINT},
county_name = #{countyName,jdbcType=VARCHAR},
town_id = #{townId,jdbcType=BIGINT},
town_name = #{townName,jdbcType=VARCHAR},
village_id = #{villageId,jdbcType=BIGINT},
village_name = #{villageName,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
hospital_address = #{hospitalAddress,jdbcType=VARCHAR},
type = #{type,jdbcType=INTEGER},
org_type = #{orgType,jdbcType=INTEGER},
level_grade = #{levelGrade,jdbcType=INTEGER},
contacts = #{contacts,jdbcType=VARCHAR},
tel = #{tel,jdbcType=VARCHAR},
source_type = #{sourceType,jdbcType=INTEGER},
enable = #{enable,jdbcType=INTEGER},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
creat_id = #{creatId,jdbcType=INTEGER},
creat_time = #{creatTime,jdbcType=TIMESTAMP},
modify_id = #{modifyId,jdbcType=INTEGER},
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
hospital_statistics_type = #{hospitalStatisticsType,jdbcType=INTEGER},
hospital_rank = #{hospitalRank,jdbcType=INTEGER},
hospital_alias = #{hospitalAlias,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
hospital_class = #{hospitalClass,jdbcType=VARCHAR},
hospital_level = #{hospitalLevel,jdbcType=VARCHAR},
hospital_grade = #{hospitalGrade,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.pica.cloud.account.account.server.mapper.PermissionDoctorRoleMapper">
<resultMap id="BaseResultMap" type="com.pica.cloud.account.account.server.entity.PermissionDoctorRole">
<id column="id" property="id" jdbcType="BIGINT"/>
<result column="doctor_id" property="doctorId" jdbcType="BIGINT"/>
<result column="hospital_id" property="hospitalId" jdbcType="BIGINT"/>
<result column="role_id" property="roleId" jdbcType="BIGINT"/>
<result column="delete_flag" property="deleteFlag" jdbcType="INTEGER"/>
<result column="created_id" property="createdId" jdbcType="BIGINT"/>
<result column="created_time" property="createdTime" jdbcType="TIMESTAMP"/>
<result column="modified_id" property="modifiedId" jdbcType="BIGINT"/>
<result column="modified_time" property="modifiedTime" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id, doctor_id, hospital_id, role_id, delete_flag, created_id, created_time, modified_id,
modified_time
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">
select
<include refid="Base_Column_List"/>
from permission_doctor_role
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from permission_doctor_role
where id = #{id,jdbcType=BIGINT}
</delete>
<!--用户权限记录表的变更-->
<insert id="updatePermissionModifyRecord">
insert into log_permission_doctor_role(`id`, `doctor_id`, `hospital_id`, `role_id`, `delete_flag`, `created_id`,
`created_time`, `modified_id`, `modified_time`)
SELECT * FROM permission_doctor_role where modified_time &gt; DATE_SUB(DATE_FORMAT(NOW(),'%Y-%m-%d
%H:00:00'),INTERVAL 1 hour) and modified_time &lt; DATE_FORMAT(NOW(), '%Y-%m-%d %H:00:00')
</insert>
<insert id="insert" parameterType="com.pica.cloud.account.account.server.entity.PermissionDoctorRole">
insert into permission_doctor_role (id, doctor_id, hospital_id,
role_id, delete_flag, created_id,
created_time, modified_id, modified_time
)
values (#{id,jdbcType=BIGINT}, #{doctorId,jdbcType=BIGINT}, #{hospitalId,jdbcType=BIGINT},
#{roleId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=INTEGER}, #{createdId,jdbcType=BIGINT},
#{createdTime,jdbcType=TIMESTAMP}, #{modifiedId,jdbcType=BIGINT}, #{modifiedTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.pica.cloud.account.account.server.entity.PermissionDoctorRole">
insert into permission_doctor_role
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="doctorId != null">
doctor_id,
</if>
<if test="hospitalId != null">
hospital_id,
</if>
<if test="roleId != null">
role_id,
</if>
<if test="deleteFlag != null">
delete_flag,
</if>
<if test="createdId != null">
created_id,
</if>
<if test="createdTime != null">
created_time,
</if>
<if test="modifiedId != null">
modified_id,
</if>
<if test="modifiedTime != null">
modified_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="doctorId != null">
#{doctorId,jdbcType=BIGINT},
</if>
<if test="hospitalId != null">
#{hospitalId,jdbcType=BIGINT},
</if>
<if test="roleId != null">
#{roleId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createdId != null">
#{createdId,jdbcType=BIGINT},
</if>
<if test="createdTime != null">
#{createdTime,jdbcType=TIMESTAMP},
</if>
<if test="modifiedId != null">
#{modifiedId,jdbcType=BIGINT},
</if>
<if test="modifiedTime != null">
#{modifiedTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective"
parameterType="com.pica.cloud.account.account.server.entity.PermissionDoctorRole">
update permission_doctor_role
<set>
<if test="doctorId != null">
doctor_id = #{doctorId,jdbcType=BIGINT},
</if>
<if test="hospitalId != null">
hospital_id = #{hospitalId,jdbcType=BIGINT},
</if>
<if test="roleId != null">
role_id = #{roleId,jdbcType=BIGINT},
</if>
<if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if test="createdId != null">
created_id = #{createdId,jdbcType=BIGINT},
</if>
<if test="createdTime != null">
created_time = #{createdTime,jdbcType=TIMESTAMP},
</if>
<if test="modifiedId != null">
modified_id = #{modifiedId,jdbcType=BIGINT},
</if>
<if test="modifiedTime != null">
modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.pica.cloud.account.account.server.entity.PermissionDoctorRole">
update permission_doctor_role
set doctor_id = #{doctorId,jdbcType=BIGINT},
hospital_id = #{hospitalId,jdbcType=BIGINT},
role_id = #{roleId,jdbcType=BIGINT},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
created_id = #{createdId,jdbcType=BIGINT},
created_time = #{createdTime,jdbcType=TIMESTAMP},
modified_id = #{modifiedId,jdbcType=BIGINT},
modified_time = #{modifiedTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册