id,pid,uid,
aid,type,lock_time,
release_time,last_follow_time,create_time
delete from restrict_project
where id = #{id,jdbcType=INTEGER}
delete from restrict_project
where uid = #{uid}
and pid = #{pid}
insert into restrict_project
( id,pid,uid
,aid,type,lock_time
,release_time,last_follow_time,create_time
)
values (#{id,jdbcType=INTEGER},#{pid,jdbcType=VARCHAR},#{uid,jdbcType=VARCHAR}
,#{aid,jdbcType=VARCHAR},#{type,jdbcType=INTEGER},#{lockTime,jdbcType=TIMESTAMP}
,#{releaseTime,jdbcType=TIMESTAMP},#{lastFollowTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP}
)
insert into restrict_project
id,pid,uid,aid,type,lock_time,release_time,last_follow_time,create_time,#{id,jdbcType=INTEGER},#{pid,jdbcType=VARCHAR},#{uid,jdbcType=VARCHAR},#{aid,jdbcType=VARCHAR},#{type,jdbcType=INTEGER},#{lockTime,jdbcType=TIMESTAMP},#{releaseTime,jdbcType=TIMESTAMP},#{lastFollowTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},
update restrict_project
pid = #{pid,jdbcType=VARCHAR},
uid = #{uid,jdbcType=VARCHAR},
aid = #{aid,jdbcType=VARCHAR},
type = #{type,jdbcType=INTEGER},
lock_time = #{lockTime,jdbcType=TIMESTAMP},
release_time = #{releaseTime,jdbcType=TIMESTAMP},
last_follow_time = #{lastFollowTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
where id = #{id,jdbcType=INTEGER}
update restrict_project
set
pid = #{pid,jdbcType=VARCHAR},
uid = #{uid,jdbcType=VARCHAR},
aid = #{aid,jdbcType=VARCHAR},
type = #{type,jdbcType=INTEGER},
lock_time = #{lockTime,jdbcType=TIMESTAMP},
release_time = #{releaseTime,jdbcType=TIMESTAMP},
last_follow_time = #{lastFollowTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
and a.aid =#{aid}
and b.nickname like concat('%',#{userName},'%')
and c.bname =#{projectName}
and a.`type` =#{type}
and a.last_follow_time between #{startTime} and #{endTime}
update restrict_project set release_time = now(),type=0
where id in
#{item}
update restrict_project set lock_time = now(),last_follow_time = now()
where uid = #{uid,jdbcType=VARCHAR} and pid = #{pid,jdbcType=VARCHAR} and aid = #{aid,jdbcType=VARCHAR}