尚医通(十一)医院模拟系统接口

news2024/9/24 9:24:38

目录

  • 一、第三方医院系统简介及运行
  • 二、上传医院接口
    • 1、数据分析
    • 2、添加service接口
    • 3、添加repository接口
    • 4、添加controller接口
    • 5、添加帮助类
    • 6、图片base64说明
    • 7、base64码通过http传输问题
  • 三、查询医院接口
    • 1、添加service方法
    • 2、添加controller
  • 四、上传科室接口
    • 1、添加科室基础类
    • 2、上传科室实现
      • 2.1 接口数据分析
      • 2.2 添加service方法和实现
      • 2.3 添加repository方法
      • 2.4 添加controller
  • 五、查询科室接口
    • 1、添加service接口和实现
    • 2、添加controller接口
  • 六、删除科室接口
    • 1、添加service方法和实现
    • 2、添加controller接口
  • 七、上传排班接口
    • 1、添加排班基础类
    • 2、上传排班实现
      • 2.1 接口数据分析
      • 2.2 添加service方法和实现
      • 2.3 添加repository方法
      • 2.4 添加controller
  • 九、查询排班接口
    • 1、添加service接口和实现
    • 2、添加controller接口
  • 十、删除科室接口
    • 1、添加service方法和实现
    • 2、添加 controller

一、第三方医院系统简介及运行

1、找到资源文件夹下面的hospital-manage项目,导入idea
2、修改application-dev.yml文件数据库连接
3、启动项目
访问浏览器:http://localhost:9998/
在这里插入图片描述

二、上传医院接口

请求参数

字段名类型长度必输说明
hoscodestring30给医院分配的唯一标识
hosnamestring50医院名称
hostypestring1医院类型(1:三级甲等,2:三级乙等,3:二级甲等,4:二级乙等,5:一级)
provinceCodestring18省code(国家统计局对应省的code)
cityCodestring50市code(国家统计局对应市的code)
districtCodestring10区code(国家统计局对应区的code)
addressstring20详情地址
logoDatastring11医院logo(转换为base64字符串)
introstring医院简介
routestring255坐车路线
bookingRulestring8000预约规则,json数据
timestamplong时间戳。从1970-01-01 00:00:00算起的毫秒数
signstring32验签参数。

同步返回

字段名类型长度必输说明
codestring结果编码。200:请求成功 不等于200:请求失败(message:失败原因)
messagestring100结果描述
datastring5000业务数据

1、数据分析

提交地址
http://localhost:8201/api/hosp/saveHospital

{
    "hoscode": "1000_0",
    "hosname": "北京协和医院",
    "hostype": "1",
    "provinceCode": "110000",
    "cityCode": "110100",
    "districtCode": "110102",
    "address": "大望路",
    "intro": "北京协和医院是集医疗、教学、科研于一体的大型三级甲等综合医院,是国家卫生计生委...目标而继续努力。",
    "route": "东院区乘车路线:106、...更多乘车路线详见须知。",
    "logoData": "iVBORw0KGgoAAAA...NSUhEUg==",
    "bookingRule": {
    "cycle": "1",
    "releaseTime": "08:30",
    "stopTime": "11:30",
    "quitDay": "-1",
    "quitTime": "15:30",
    "rule": [
        "西院区预约号取号地点:西院区门诊楼一层大厅挂号窗口取号",
        "东院区预约号取号地点:东院区老门诊楼一层大厅挂号窗口或新门诊楼各楼层挂号/收费窗口取号"
        ]
  }
}

说明:
1,数据分为医院基本信息与预约规则信息
2,医院logo转换为base64字符串
3,预约规则信息属于医院基本信息的一个属性
4,预约规则rule,以数组形式传递
5,数据传递过来我们还要验证签名,只允许平台开通的医院可以上传数据,保证数据安全性

2、添加service接口

import java.util.Map;

public interface HospitalService {
    void saveHospital(Map<String, Object> resultMap);

    String getSignKeyWithHoscode(String requestHoscode);

}

在HospitalServiceImpl类添加实现

@Service
public class HospitalServiceImpl implements HospitalService {

    @Autowired
    private HospitalRepository hospitalRepository;

    @Autowired
    private HospitalSetMapper hospitalSetMapper;


    @Override
    public void saveHospital(Map<String, Object> resultMap) {
        String s = JSONObject.toJSONString(resultMap);
        Hospital hospital = JSONObject.parseObject(s, Hospital.class);
        //如果医院两次保存那么会保存两次,如果数据没有就保存,数据有就更新     save既可以保存,也可以更新
        String hoscode = hospital.getHoscode();
        Hospital collection = hospitalRepository.findByHoscode(hoscode);
        if (collection == null){   //平台上没有该医院信息做添加
            hospital.setStatus(0);
            hospital.setCreateTime(new Date());
            hospital.setUpdateTime(new Date());
            hospital.setIsDeleted(0);
            hospitalRepository.save(hospital);
        }else {  //平台上有医院信息做修改
            hospital.setStatus(collection.getStatus());
            hospital.setCreateTime(collection.getCreateTime());
            hospital.setUpdateTime(new Date());
            hospital.setIsDeleted(collection.getIsDeleted());
            //要进行id进行修改
            hospital.setId(collection.getId());
            hospitalRepository.save(hospital);
        }

    }

    @Override
    public String getSignKeyWithHoscode(String requestHoscode) {
        QueryWrapper<HospitalSet> wrapper = new QueryWrapper<>();
        wrapper.eq("hoscode",requestHoscode);
        HospitalSet hospitalSet = hospitalSetMapper.selectOne(wrapper);
        if (hospitalSet == null){
            throw new YyghException(20001,"该医院信息不存在");
        }
        return hospitalSet.getSignKey();
    }
}

3、添加repository接口

在HospitalRepository类添加接口

public interface HospitalRepository extends MongoRepository<Hospital,String> {
    Hospital findByHoscode(String hoscode);
}

4、添加controller接口

@RestController
@RequestMapping("/api/hosp")
public class HospitalController {

    @Autowired
    private HospitalService hospitalService;

    @PostMapping("/saveHospital")
    public Result saveHospital(HttpServletRequest request){
        //1.获取所有的参数(发现一个键对应多个值,需要转换一个键对应一个值) 因为我们的数据都一个键对用一个值
        Map<String, String[]> parameterMap = request.getParameterMap();
        Map<String, Object> resultMap = HttpRequestHelper.switchMap(parameterMap);
        String requestSignKey = (String) resultMap.get("sign");
        String requestHoscode = (String) resultMap.get("hoscode");
        String platformSignKey = hospitalService.getSignKeyWithHoscode(requestHoscode);
        String encrypt = MD5.encrypt(platformSignKey);
        if (!StringUtils.isEmpty(requestSignKey)&&!StringUtils.isEmpty(requestHoscode)&& encrypt.equals(requestSignKey)){
            String logoData = (String) resultMap.get("logoData");

            String result = logoData.replaceAll(" ", "+");
            resultMap.put("logoData",result);
            hospitalService.saveHospital(resultMap);
            return Result.ok();
        }else {
            throw new YyghException(20001,"保存失败");
        }
    }
}

5、添加帮助类

Map<String, String[]> 转换成Map<String, Object>

public class HttpRequestHelper {

    public static Map<String, Object> switchMap(Map<String, String[]> parameterMap) {
        Map<String, Object> map = new HashMap<>();
        Set<Map.Entry<String, String[]>> entries = parameterMap.entrySet();
        for (Map.Entry<String, String[]> entry : entries) {
            String key = entry.getKey();
            String value = entry.getValue()[0];
            map.put(key,value);
        }
        return map;
    }
}

6、图片base64说明

图片的base64编码就是可以将一张图片数据编码成一串字符串,使用该字符串代替图像地址url
在前端页面中常见的base64图片的引入方式:

<html>
<head>
</head>
<body>
<img src="data:image/png;base64,iVBORw0K....">
</body>
</html>

7、base64码通过http传输问题

base64码通过http传输 +号变 空格 问题解决
解决方案

url = url.replaceAll(" ","+");

三、查询医院接口

提交地址
http://localhost:8201/api/hosp/hospital/show
请求参数

字段名类型长度必输说明
hoscodestring30给医院分配的唯一标识
timestamplong时间戳。从1970-01-01 00:00:00算起的毫秒数
signstring32验签参数。

同步返回

字段名类型长度必输说明
codestring结果编码。200:请求成功 不等于200:请求失败(message:失败原因)
messagestring100结果描述
datastring5000业务数据

1、添加service方法

HospitalService

    Hospital getByHoscode(String hoscode);

HospitalServiceImpl

    @Override
    public Hospital getByHoscode(String hoscode) {
        Hospital hospital = hospitalRepository.findByHoscode(hoscode);
        return hospital;
    }

2、添加controller

HospitalController

    @PostMapping("/hospital/show")
    public Result hospitalShow(HttpServletRequest request){
        Map<String, String[]> map = request.getParameterMap();
        Map<String, Object> switchMap = HttpRequestHelper.switchMap(map);
        //必须参数校验
        String hoscode = (String) switchMap.get("hoscode");
        if (StringUtils.isEmpty(hoscode)){
            throw new YyghException(20001,"失败");
        }
        //签名验证  略
        Hospital hospital = hospitalService.getByHoscode(hoscode);
        return Result.ok(hospital);
    }

在这里插入图片描述

四、上传科室接口

提交地址
http://localhost:8201/api/hosp/saveDepartment
请求参数

字段名类型长度必输说明
hoscodestring30给医院分配的唯一标识
depcodestring50科室编号
depnamestring1科室名称
introstring18科室描述
bigcodestring50大科室编号
bignamestring10大科室名称
addressstring20详情地址
timestamplong时间戳。从1970-01-01 00:00:00算起的毫秒数
signstring32验签参数。

同步返回

字段名类型长度必输说明
codestring结果编码。200:请求成功不等于200:请求失败(message:失败原因)
messagestring100结果描述
datastring5000业务数据

1、添加科室基础类

说明:由于实体对象没有逻辑,我们已经统一导入
在这里插入图片描述
添加repository

@Repository
public interface DepartmentRepository extends MongoRepository<Department,String> {
}

添加service接口和实现类

public interface DepartmentService {
}

@Service
public class DepartmentServiceImpl implements DepartmentService {

    @Autowired
    private DepartmentRepository departmentRepository;

}

2、上传科室实现

2.1 接口数据分析

{
    "hoscode": "1000_0",
    "depcode": "200050923",
    "depname": "门诊部核酸检测门诊(东院)",
    "intro": "门诊部核酸检测门诊(东院)",
    "bigcode": "44f162029abb45f9ff0a5f743da0650d",
    "bigname": "体检科"
}

说明:一个大科室下可以有多个小科室,如图:
在这里插入图片描述

2.2 添加service方法和实现

/**
 * 上传科室信息
 * @param paramMap
*/
void save(Map<String, Object> paramMap);

@Service
public class DepartmentServiceImpl implements DepartmentService {

    @Autowired
    private DepartmentRepository departmentRepository;

    @Override
    public void save(Map<String, Object> map) {
        //map 转换department对象
        String jsonString = JSONObject.toJSONString(map);
        Department department = JSONObject.parseObject(jsonString, Department.class);
        //根据医院编号 和 科室编号查询
        Department departmentExist = departmentRepository.getDepartmentByHoscodeAndDepcode(department.getHoscode(),department.getDepcode());
        if (departmentExist == null){
            department.setCreateTime(new Date());
            department.setUpdateTime(new Date());
            department.setIsDeleted(0);
            departmentRepository.save(department);
        }else {
            department.setCreateTime(departmentExist.getCreateTime());
            department.setUpdateTime(new Date());
            department.setIsDeleted(departmentExist.getIsDeleted());
            departmentRepository.save(department);
        }

    }
}

2.3 添加repository方法

@Repository
public interface DepartmentRepository extends MongoRepository<Department,String> {
    Department getDepartmentByHoscodeAndDepcode(String hoscode, String depcode);
}

2.4 添加controller

DepartmentController

@RestController
@RequestMapping("/api/hosp")
public class DepartmentController {

    @Autowired
    private DepartmentService departmentService;

    @ApiOperation(value = "上传科室")
    @PostMapping("saveDepartment")
    public Result saveDepartment(HttpServletRequest request){
        Map<String, Object> map = HttpRequestHelper.switchMap(request.getParameterMap());
        //必须参数校验 略
        //签名校验
        departmentService.save(map);
        return Result.ok();
    }
}

在这里插入图片描述

五、查询科室接口

一个医院有多个科室,因此我们采取分页查询方式
提交地址
http://localhost:8201/api/hosp/department/list
请求参数

字段名类型长度必输说明
hoscodestring30给医院分配的唯一标识
pageInt第几页
listInt每页个数
timestamplong时间戳。从1970-01-01 00:00:00算起的毫秒数
signstring32验签参数。

同步返回

字段名类型长度必输说明
codestring结果编码。200:请求成功不等于200:请求失败(message:失败原因)
messagestring100结果描述
datastring5000业务数据

1、添加service接口和实现

/**
 * 分页查询
 * @param page 当前页码
 * @param limit 每页记录数
 * @param departmentQueryVo 查询条件
 * @return
*/
Page<Department> getDepartmentPage(Map<String, Object> map);

    //分页实现
    @Override
    public Page<Department> getDepartmentPage(Map<String, Object> map) {
        Integer page = Integer.parseInt((String) map.get("page"));
        Integer limit = Integer.parseInt((String) map.get("limit"));
        //0默认是第一页
        PageRequest pageable = PageRequest.of(page - 1, limit);
        Department department = new Department();
        department.setHoscode((String) map.get("hoscode"));
        Example<Department> example = Example.of(department);
        Page<Department> all = departmentRepository.findAll(example, pageable);
        return all;
    }

2、添加controller接口

    @ApiOperation(value = "获取分页列表")
    @PostMapping("department/list")
    public Result department(HttpServletRequest request){
        Map<String, Object> map = HttpRequestHelper.switchMap(request.getParameterMap());
        //必须参数校验 略
        //签名校验
        Page<Department> page = departmentService.getDepartmentPage(map);
        return Result.ok(page);
    }

在这里插入图片描述

六、删除科室接口

提交地址
http://localhost:8201/api/hosp/department/remove
请求参数

字段名类型长度必输说明
hoscodestring30给医院分配的唯一标识
depcodestring30科室编号
timestamplong时间戳。从1970-01-01 00:00:00算起的毫秒数
signstring32验签参数。

同步返回

字段名类型长度必输说明
codestring结果编码。200:请求成功不等于200:请求失败(message:失败原因)
messagestring100结果描述
datastring5000业务数据

1、添加service方法和实现

/**
     * 删除科室
     * @param hoscode
     * @param depcode
     */
void remove(Map<String, Object> map);

    @Override
    public void remove(Map<String, Object> map) {
        String hoscode = (String)map.get("hoscode");
        String depcode = (String)map.get("depcode");
        Department department = departmentRepository.getDepartmentByHoscodeAndDepcode(hoscode, depcode);
        if (department != null){
            departmentRepository.deleteById(department.getId());
        }
    }

2、添加controller接口

    @ApiOperation(value = "删除科室")
    @PostMapping("department/remove")
    public Result remove(HttpServletRequest request){
        Map<String, Object> map = HttpRequestHelper.switchMap(request.getParameterMap());
        //必须参数校验 略
        departmentService.remove(map);
        return Result.ok();
    }

七、上传排班接口

提交地址
http://localhost:8201/api/hosp/saveSchedule

请求参数

字段名类型长度必输说明
hoscodestring30给医院分配的唯一标识
depcodestring20科室编号
titlestring30职称
docnamestring30医生名称
skillstring300擅长技能
workDatestring10安排日期(yyyy-MM-dd)
workTimeint安排时间(0:上午 1:下午)
reservedNumberint可预约数
availableNumberint剩余预约数
amountstring5挂号费
statusint排班状态(-1:停诊 0:停约 1:可约)
hosScheduleIdstring30排班编号(医院自己的排班主键)
timestamplong是 时间戳。从1970-01-01 00:00:00算起的毫秒数
signstring32验签参数。

同步返回

字段名类型长度必输说明
codestring结果编码。200:请求成功不等于200:请求失败(message:失败原因)
messagestring100结果描述
datastring5000业务数据

1、添加排班基础类

在这里插入图片描述
添加repository

@Repository
public interface ScheduleRepository extends MongoRepository<Schedule,String> {
}

添加service接口和实现类

public interface ScheduleService {
}

@Service
public class ScheduleServiceImpl implements ScheduleService {
    
    @Autowired
    private ScheduleRepository scheduleRepository;
}

2、上传排班实现

2.1 接口数据分析

{
    "hoscode": "1000_0",
    "depcode": "200040878",
    "title": "医师",
    "docname": "",
    "skill": "内分泌科常见病。",
    "workDate": "2020-06-22",
    "workTime": 0,
    "reservedNumber": 33,
    "availableNumber": 22,
    "amount": "100",
    "status": 1,
    "hosScheduleId": "1"
}

2.2 添加service方法和实现

public interface ScheduleService {
    void saveSchedule(Map<String, Object> map);
}

@Service
public class ScheduleServiceImpl implements ScheduleService {

    @Autowired
    private ScheduleRepository scheduleRepository;

    @Override
    public void saveSchedule(Map<String, Object> map) {
        Schedule schedule = JSONObject.parseObject(JSONObject.toJSONString(map), Schedule.class);
        String hoscode = schedule.getHoscode();
        String depcode = schedule.getDepcode();
        String hosScheduleId = schedule.getHosScheduleId();
        Schedule platformSchedule = scheduleRepository.findByHoscodeAndDepcodeAndHosScheduleId(hoscode,depcode,hosScheduleId);

        if (platformSchedule == null){
            schedule.setCreateTime(new Date());
            schedule.setUpdateTime(new Date());
            schedule.setIsDeleted(0);
            scheduleRepository.save(schedule);
        }else {
            schedule.setCreateTime(new Date());
            schedule.setUpdateTime(platformSchedule.getUpdateTime());
            schedule.setIsDeleted(platformSchedule.getIsDeleted());
            schedule.setId(platformSchedule.getId());
            scheduleRepository.save(schedule);
        }
    }
}

2.3 添加repository方法

@Repository
public interface ScheduleRepository extends MongoRepository<Schedule,String> {
    Schedule findByHoscodeAndDepcodeAndHosScheduleId(String hoscode, String depcode, String hosScheduleId);
}

2.4 添加controller

ScheduleController

@RestController
@RequestMapping("/api/hosp")
public class ScheduleController {

    @Autowired
    private ScheduleService scheduleService;

    @ApiOperation(value = "上传排班")
    @PostMapping("saveSchedule")
    public Result saveSchedule(HttpServletRequest request){
        Map<String, Object> map = HttpRequestHelper.switchMap(request.getParameterMap());
        //验证signKey  略
        scheduleService.saveSchedule(map);
        return Result.ok();
    }

}

九、查询排班接口

一个科室有多个科室,因此我们采取分页查询方式
提交地址
http://localhost:8201/api/hosp/schedule/list
请求参数

字段名类型长度必输说明
hoscodestring30给医院分配的唯一标识
pageNumInt第几页
pageSizeInt每页个数
timestamplong时间戳。从1970-01-01 00:00:00算起的毫秒数
signstring32验签参数。

同步返回

字段名类型长度必输说明
codestring结果编码。200:请求成功不等于200:请求失败(message:失败原因)
messagestring100结果描述
datastring5000业务数据

1、添加service接口和实现

/**
     * 分页查询
     * @param page 当前页码
     * @param limit 每页记录数
     * @param scheduleQueryVo 查询条件
     * @return
*/
Page<Schedule> getSchedulePage(Map<String, Object> map);

@Override
    public Page<Schedule> getSchedulePage(Map<String, Object> map) {
        Integer page = Integer.parseInt((String) map.get("page"));
        Integer limit = Integer.parseInt((String) map.get("limit"));
        //0为第一页
        Pageable pageable = PageRequest.of(page-1, limit, Sort.by("createTime").ascending());
        String hoscode = (String)map.get("hoscode");
        Schedule schedule = new Schedule();
        schedule.setHoscode(hoscode);
        Example<Schedule> scheduleExample = Example.of(schedule);
        Page<Schedule> pages = scheduleRepository.findAll(scheduleExample, pageable);
        return pages;
    }

2、添加controller接口

    @ApiOperation(value = "获取排班分页列表")
    @PostMapping("/schedule/list")
    public Result getSchedulePage(HttpServletRequest request){
        Map<String, Object> map = HttpRequestHelper.switchMap(request.getParameterMap());
        //验证signKey  略
        Page<Schedule> schedulePage = scheduleService.getSchedulePage(map);
        return Result.ok(schedulePage);
    }

在这里插入图片描述

十、删除科室接口

提交地址
http://localhost/api/hosp/department/remove
请求参数

字段名类型长度必输说明
hoscodestring30给医院分配的唯一标识
hosScheduleIdstring30科室编号
timestamplong时间戳。从1970-01-01 00:00:00算起的毫秒数
signstring32验签参数。

同步返回

字段名类型长度必输说明
codestring结果编码。200:请求成功不等于200:请求失败(message:失败原因)
messagestring100结果描述
datastring5000业务数据

根据医院编号与排班编号删除科室

1、添加service方法和实现

/**
     * 删除排班
     * @param hoscode
     * @param hosScheduleId
     */
void remove(Map<String, Object> map);

//实现方法
    @Override
    public void remove(Map<String, Object> map) {
        String hoscode = (String)map.get("hoscode");
        String hosScheduleId = (String)map.get("hosScheduleId");
        Schedule schedule = scheduleRepository.findByHoscodeAndHosScheduleId(hoscode,hosScheduleId);
        if (schedule!=null){
            scheduleRepository.deleteById(schedule.getId());
        }
    }

2、添加 controller

    @ApiOperation(value = "删除排班")
    @PostMapping("schedule/remove")
    public Result remove(HttpServletRequest httpServletRequest){
        Map<String, Object> map = HttpRequestHelper.switchMap(httpServletRequest.getParameterMap());
        //验证signKey  略
        scheduleService.remove(map);
        return Result.ok();
    }

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/340813.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

C语言学习笔记(二): 简单的C程序设计

数据的表现形式 常量 在C语言中常量有以下几种&#xff1a; 整型常量&#xff1a; 0,-1,100实型常量&#xff1a; 小数形式(12.12)&#xff1b;指数形式(12.1e312.110312.1\times 10^312.1103)字符常量&#xff1a; 普通字符(’a’,’Z’,’#’)&#xff1b;转义字符(’\n’…

nacos 集群搭建

1、单节点nacos搭建 ------------------------> 跳转单节点搭建 2、nacos 集群 搭建 请注意本次演示在win上进行&#xff0c;在linux 或 k8s&#xff0c;过程类似 2.1 将nacos&#xff0c;copy成三份 2.2 修改nacos配置信息 如下图&#xff0c;需要修改两个配置文件&am…

ansible的部署与命令模块

目录 一、ansible的概述 1、ansible简介 2、ansible特点 3、官方网站 4、ansible的模块组成 5、ansible的工作机制 二、ansible部署 1、ansible的安装 三、ansible的命令行模块 1、command模块 2、shell模块 3、cron模块 4、user模块 5、group模块 6、copy模块 7…

千锋教育+计算机四级网络-计算机网络学习-03

目录 UDP编程准备 字节序概述 如何判断自己主机上的大小端方式 大小端重点 大小端所需函数 htonl函数 ntohl函数 htons函数 ntohs函数 地址转换函数 inet_pton函数 inet_ntop函数 UDP编程准备 字节序概述 字节序概念 是指多字节数据的存储顺序&#xff0c;一个字节是…

浏览器缓存是如何提升网站访问速度的

提升速度&#xff0c;降低负载 浏览器访问一个页面时&#xff0c;会请求加载HTML、CSS和JS等静态资源&#xff0c;并把这些内容渲染到屏幕上。 对浏览器来说&#xff0c;如果页面没有更新&#xff0c;每次都去请求服务器是没有必要的。所以&#xff0c;把下载的资源缓存起来&…

快速傅里叶算法(FFT)快在哪里?

目录 前言 1、DFT算法 2、FFT算法 2.1 分类 2.2 以基2 DIT&#xff08;时间抽取&#xff09; FFT 算法为例 2.2.1 一次分解 2.2.2 多次分解 参考 前言 对信号分析的过程中&#xff0c;为了能换一个角度观察问题&#xff0c;很多时候需要把时域信号波形变换到频域进行分…

有什么免费好用的全球天气api?

简单介绍几个&#xff0c;选你觉得合适的就行。&#xff08;下面推荐的国内外的都有&#xff0c;访问速度会有些差别&#xff09; 高德天气 API -天气查询-API文档-开发指南-Web服务 API | 高德地图API知心天气 API -HyperData 数据产品简介 心知天气和风天气 API -和风天气开…

AI_News周刊:第一期

2023.02.06—2023.02.12 关于ChatGPT的前言&#xff1a; 在去年年末&#xff0c;OpenAI的ChatGPT在技术圈已经火了一次&#xff0c;随着上周它的二次出圈&#xff0c;ChatGPT算得上是人工智能领域的一颗明星&#xff0c;它在聊天机器人领域有着不可忽视的影响力。其准确、快速…

webpack.config.js哪里找?react项目关闭eslint监测

目录 webpack.config.js哪里找&#xff1f; react项目关闭eslint监测 webpack.config.js哪里找&#xff1f; 在React项目中&#xff0c;当我们需要修改一些配置时&#xff0c;发现找不到webpack.config.js&#xff0c;是我们创建的项目有问题吗&#xff0c;还需新创建项目的项…

【html】模仿C站动态发红包界面,css+div+js实现布局和交互(适合入门)

最近有些小伙伴咨询博主说前端布局好难&#xff0c;其实都是熟能生巧&#xff01; 模仿C站动态发红包界面&#xff0c;cssdiv实现布局&#xff0c;纯javascript实现交互效果 目录 1、界面效果 2、界面分析 2.1、整体结构 2.2、标题 2.3、表单 2.4、按钮 3、代码实现 3.…

【Kafka】【七】主题和分区的概念

主题和分区的概念 主题Topic 主题-topic在kafka中是⼀个逻辑的概念&#xff0c;kafka通过topic将消息进⾏分类。不同的topic会被订阅该topic的消费者消费。 但是有⼀个问题&#xff0c;如果说这个topic中的消息⾮常⾮常多&#xff0c;多到需要⼏T来存&#xff0c;因为消息是…

Spring Security in Action 第十二章 OAuth 2是如何工作的?

本专栏将从基础开始&#xff0c;循序渐进&#xff0c;以实战为线索&#xff0c;逐步深入SpringSecurity相关知识相关知识&#xff0c;打造完整的SpringSecurity学习步骤&#xff0c;提升工程化编码能力和思维能力&#xff0c;写出高质量代码。希望大家都能够从中有所收获&#…

实战打靶集锦-005-HL

**写在前面&#xff1a;**记录一次曲折的打靶经历。 目录1. 主机发现2. 端口扫描3. 服务枚举4. 服务探查4.1 浏览器访问4.2 目录枚举4.3 探查admin4.4 探查index4.5 探查login5 公共EXP搜索6. 再次目录枚举6.1 探查superadmin.php6.2 查看页面源代码6.3 base64绕过6.4 构建反弹…

JointBERT代码复现详解【下】

BERT for Joint Intent Classification and Slot Filling代码复现【下】 链接直达&#xff1a;JointBERT代码复现详解【上】 四、模型训练与评估 Trainer training&#xff1a;梯度更新evaluate&#xff1a;评估序列标注任务如何得到预测结果、评估函数 1.初始化准备 def …

【Unity3D】Shader常量、变量、结构体、函数

1 源码路径 Unity Shader 常量、变量、结构体、函数一般可以在 Unity Editor 安装目录下面的【Editor\Data\CGIncludes\UnityShader】目录下查看源码&#xff0c;主要源码文件如下&#xff1a; UnityCG.cgincUnityShaderUtilities.cgincUnityShaderVariables.cginc 2 Shader 常…

大数据技术架构(组件)33——Spark:Spark SQL--Join Type

2.2.2、Join Type2.2.2.1、Broadcast Hash Join (Not Shuffled)就是常说的MapJoin,join操作在map端进行的。场景&#xff1a;join的其中一张表要很小&#xff0c;可以放到Driver或者Executor端的内存中。原理:1、将小表的数据广播到所有的Executor端&#xff0c;利用collect算子…

微信小程序 数据绑定 Mustache语法怎么使用?

1.数据绑定的基本原则 ①在data中定义数据 ②在WXML中使用数据、 在页面对应的 .js 文件中。把数据定义到data对象中即可 在WXML文件中使用{{}}两个花括号加变量名称进行调用 以上使用方法&#xff0c;下面我么来实操 Mustache语法主要使用场景如下: 文本内容绑定 组件属性绑定…

Service

目录 文章目录目录本节实战1、Service1.Service概念2.Service存在的意义3.Pod与Service的关系2、三种IP3、定义 Service4、kube-proxy1.iptables2.ipvsiptables vs ipvs5、Service常见类型1.ClusterIP2.NodePort3.LoadBalancer4.ExternalName5.externalIPs6、Endpoints 与 Endp…

Java基础常见面试题(三)

String 字符型常量和字符串常量的区别&#xff1f; 形式上: 字符常量是单引号引起的一个字符&#xff0c;字符串常量是双引号引起的若干个字符&#xff1b; 含义上: 字符常量相当于一个整型值( ASCII 值)&#xff0c;可以参加表达式运算&#xff1b;字符串常量代表一个地址值…

STC15读取内部ID示例程序

STC15读取内部ID示例程序&#x1f389;本案例基于STC15F2K60S2为验证对象。 &#x1f4d1;STC15 ID序列介绍 STC15系列STC最新一代STC15系列单片机出厂时都具有全球唯一身份证号码(ID号)。最新STC15系列单片机的程序存储器的最后7个字节单元的值是全球唯一ID号&#xff0c;用…