1
This commit is contained in:
1 parent
6c91d4178f
commit
6d4202d56c
3 files changed
+85
No files matched your search
+16
@@ -1,8 +1,10 @@
|
||||
package com.bsd.pjcloud.canteen.mapper;
|
||||
|
||||
import com.bsd.pjcloud.canteen.vo.AppMakeSaveReqVO;
|
||||
import com.bsd.pjcloud.common.data.datascope.PjcloudBaseMapper;
|
||||
import com.bsd.pjcloud.canteen.entity.BoxesAvailabilityEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@Mapper
|
||||
public interface BoxesAvailabilityMapper extends PjcloudBaseMapper<BoxesAvailabilityEntity> {
|
||||
@@ -14,4 +16,18 @@ public interface BoxesAvailabilityMapper extends PjcloudBaseMapper<BoxesAvailabi
|
||||
* @return
|
||||
*/
|
||||
BoxesAvailabilityEntity findTopByRoomIdOrderByDateDesc(Long id);
|
||||
|
||||
/**
|
||||
* 查看当前时间段是否有人预约
|
||||
* @param bxDate
|
||||
* @param startTime
|
||||
* @param endTime
|
||||
* @return
|
||||
*/
|
||||
int isMakeTime(@Param("bxDate") String bxDate,
|
||||
@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime);
|
||||
|
||||
|
||||
void updateStatusByStartTimeAndEndTimeAndBxDate(AppMakeSaveReqVO createReqVO);
|
||||
}
|
||||
+10
@@ -18,6 +18,11 @@
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
<update id="updateStatusByStartTimeAndEndTimeAndBxDate" parameterType="com.bsd.pjcloud.canteen.vo.AppMakeSaveReqVO">
|
||||
UPDATE boxes_availability
|
||||
SET status = 1
|
||||
WHERE boxes_id = #{boxesId} AND bx_date =#{bxDate} AND hour between #{startTime} AND #{endTime}
|
||||
</update>
|
||||
<select id="findTopByRoomIdOrderByDateDesc"
|
||||
resultMap="boxesAvailabilityMap">
|
||||
SELECT * FROM boxes_availability
|
||||
@@ -25,4 +30,9 @@
|
||||
ORDER BY bx_date DESC,hour DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
<select id="isMakeTime" resultType="java.lang.Integer">
|
||||
SELECT count(id) FROM boxes_availability
|
||||
WHERE bx_date =#{bxDate} and status=1
|
||||
AND hour between #{startTime} AND #{endTime}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,59 @@
|
||||
server:
|
||||
port: 8848
|
||||
tomcat:
|
||||
basedir: logs
|
||||
error:
|
||||
include-message: always
|
||||
db:
|
||||
num: 1
|
||||
user: ${MYSQL_USER:root@sys}
|
||||
password: ${MYSQL_PWD:bsd.1799}
|
||||
url:
|
||||
0: jdbc:mysql://${MYSQL_HOST:pjcloud-mysql}:${MYSQL_PORT:2881}/${MYSQL_DB:pjcloudx_config}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
|
||||
pool:
|
||||
config:
|
||||
connectionTimeout: 30000
|
||||
validationTimeout: 10000
|
||||
|
||||
nacos:
|
||||
core:
|
||||
auth:
|
||||
server:
|
||||
identity:
|
||||
key: serverIdentity
|
||||
value: security
|
||||
system.type: nacos
|
||||
plugin.nacos.token.secret.key: SecretKey012345678901234567890123456789012345678901234567890123456789
|
||||
security:
|
||||
ignore:
|
||||
urls: /actuator/**,/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
|
||||
|
||||
spring:
|
||||
datasource:
|
||||
platform: mysql #这个过期属性不能修改,nacos 代码对此有硬编码
|
||||
security:
|
||||
enabled: true
|
||||
boot: # 接入 spring boot admin
|
||||
admin:
|
||||
client:
|
||||
url: http://pjcloud-monitor:5001
|
||||
username: pig
|
||||
password: pig
|
||||
instance:
|
||||
service-host-type: ip
|
||||
application:
|
||||
name: @project.artifactId@
|
||||
|
||||
useAddressServer: true
|
||||
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: '*'
|
||||
metrics:
|
||||
export:
|
||||
influx:
|
||||
enabled: false
|
||||
elastic:
|
||||
enabled: false
|
||||
Reference in new issue
Block a user