一、移动端开发

1.移动端开发方式

随着移动互联网的兴起和手机的普及,目前移动端应用变得愈发重要,成为了各个商家的必争之地。例如,我们可以使用手机购物、支付、打车、玩游戏、订酒店、购票等, 以前只能通过PC端完成的事情,现在通过手机都能够实现,而且更加方便,而这些都需要移动端开发进行支持,那如何进行移动端开发呢?
移动端开发主要有三种方式:
1、基于手机API开发(原生APP)
2、基于手机浏览器开发(移动web)
3、混合开发(混合APP)

1.1 基于手机API开发
手机端使用手机API,例如使用Android、ios 等进行开发,服务端只是一个数据提供者。 手机端请求服务端获取数据(json、xml格式)并在界面进行展示。这种方式相当于传统 开发中的C/S模式,即需要在手机上安装一个客户端软件。
这种方式需要针对不同的手机系统分别进行开发,目前主要有以下几个平台:
1、苹果ios系统版本,开发语言是Objective-C
2、安卓Android系统版本,开发语言是Java
3、微软Windows phone系统版本,开发语言是C#
4、塞班symbian系统版本,开发语言是C++
此种开发方式举例:手机淘宝、抖音、今日头条、大众点评

1.2 基于手机浏览器开发
生存在浏览器中的应用,基本上可以说是触屏版的网页应用。这种开发方式相当于传统开发中的B/S模式,也就是手机上不需要额外安装软件,直接基于手机上的浏览器进行访问。这就需要我们编写的html页面需要根据不同手机的尺寸进行自适应调节,目前比较流行的是html5开发。除了直接通过手机浏览器访问,还可以将页面内嵌到一些应用程序中,例如通过微信公众号访问html5页面。
这种开发方式不需要针对不同的手机系统分别进行开发,只需要开发一个版本,就可以在不同的手机上正常访问。

1.3 混合开发
是半原生半Web的混合类App。需要下载安装,看上去类似原生App,访问的内容是Web 网页。其实就是把HTML5页面嵌入到一个原生容器里面

二、需求分析和环境搭建

1.搭建移动端工程

本项目是基于SOA架构进行开发,前面我们已经完成了后台系统的部分功能开发,在后台系统中都是通过Dubbo调用服务层发布的服务进行相关的操作。本章节我们开发移动端工程也是同样的模式,所以我们也需要在移动端工程中通过Dubbo调用服务层发布的服务。
1.1 导入maven坐标
在health_common工程的pom.xml文件中导入阿里短信发送的maven坐标

<dependency><groupId>com.aliyun</groupId><artifactId>aliyun-java-sdk-core</artifactId><version>3.3.1</version>
</dependency>
<dependency><groupId>com.aliyun</groupId><artifactId>aliyun-java-sdk-dysmsapi</artifactId><version>1.0.0</version>
</dependency>

1.2 导入通用组件

在health_common工程中导入如下通用组件

ValidateCodeUtils工具类:

/*** 随机生成验证码工具类*/
public class ValidateCodeUtils {/*** 随机生成验证码* @param length 长度为4位或者6位* @return*/public static Integer generateValidateCode(int length){Integer code =null;if(length == 4){code = new Random().nextInt(9999);//生成随机数,最大为9999if(code < 1000){code = code + 1000;//保证随机数为4位数字}}else if(length == 6){code = new Random().nextInt(999999);//生成随机数,最大为999999if(code < 100000){code = code + 100000;//保证随机数为6位数字}}else{throw new RuntimeException("只能生成4位或6位数字验证码");}return code;}/*** 随机生成指定长度字符串验证码* @param length 长度* @return*/public static String generateValidateCode4String(int length){Random rdm = new Random();String hash1 = Integer.toHexString(rdm.nextInt());String capstr = hash1.substring(0, length);return capstr;}
}

SMSUtils工具类:

/*** 短信发送工具类*/
public class SMSUtils {public static final String VALIDATE_CODE = "SMS_159620392";//发送短信验证码public static final String ORDER_NOTICE = "SMS_159771588";//体检预约成功通知/*** 发送短信* @param phoneNumbers* @param param* @throws ClientException*/public static void sendShortMessage(String templateCode,String phoneNumbers,String param) throws ClientException{// 设置超时时间-可自行调整System.setProperty("sun.net.client.defaultConnectTimeout", "10000");System.setProperty("sun.net.client.defaultReadTimeout", "10000");// 初始化ascClient需要的几个参数final String product = "Dysmsapi";// 短信API产品名称(短信产品名固定,无需修改)final String domain = "dysmsapi.aliyuncs.com";// 短信API产品域名(接口地址固定,无需修改)// 替换成你的AKfinal String accessKeyId = "LTAIak3CfAehK7cE";// 你的accessKeyId,参考本文档步骤2final String accessKeySecret = "zsykwhTIFa48f8fFdU06GOKjHWHel4";// 你的accessKeySecret,参考本文档步骤2// 初始化ascClient,暂时不支持多region(请勿修改)IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKeyId, accessKeySecret);DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", product, domain);IAcsClient acsClient = new DefaultAcsClient(profile);// 组装请求对象SendSmsRequest request = new SendSmsRequest();// 使用post提交request.setMethod(MethodType.POST);// 必填:待发送手机号。支持以逗号分隔的形式进行批量调用,批量上限为1000个手机号码,批量调用相对于单条调用及时性稍有延迟,验证码类型的短信推荐使用单条调用的方式request.setPhoneNumbers(phoneNumbers);// 必填:短信签名-可在短信控制台中找到request.setSignName("健康管理");// 必填:短信模板-可在短信控制台中找到request.setTemplateCode(templateCode);// 可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为// 友情提示:如果JSON中需要带换行符,请参照标准的JSON协议对换行符的要求,比如短信内容中包含\r\n的情况在JSON中需要表示成\\r\\n,否则会导致JSON在服务端解析失败request.setTemplateParam("{\"code\":\""+param+"\"}");// 可选-上行短信扩展码(扩展码字段控制在7位或以下,无特殊需求用户请忽略此字段)// request.setSmsUpExtendCode("90997");// 可选:outId为提供给业务方扩展字段,最终在短信回执消息中将此值带回给调用者// request.setOutId("yourOutId");// 请求失败这里会抛ClientException异常SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request);if (sendSmsResponse.getCode() != null && sendSmsResponse.getCode().equals("OK")) {// 请求成功System.out.println("请求成功");}}
}

RedisMessageConstant常量类:

public class RedisConstant {//套餐图片所有图片名称public static final String SETMEAL_PIC_RESOURCES = "setmealPicResources";//套餐图片保存在数据库中的图片名称public static final String SETMEAL_PIC_DB_RESOURCES = "setmealPicDbResources";
}

最后定义目录结构如下:

1.3 health_mobile
创建移动端工程health_mobile,打包方式为war,用于存放Controller,在Controller中通过Dubbo可以远程访问服务层相关服务,所以需要依赖health_interface接口工程。

pom.xml

<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><parent><artifactId>health_parent</artifactId><groupId>com.bianyi</groupId><version>1.0-SNAPSHOT</version></parent><modelVersion>4.0.0</modelVersion><groupId>com.bianyi</groupId><artifactId>health_mobile</artifactId><packaging>war</packaging><name>health_mobile Maven Webapp</name><!-- FIXME change it to the project's website --><url>http://www.example.com</url><properties><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><maven.compiler.source>1.8</maven.compiler.source><maven.compiler.target>1.8</maven.compiler.target></properties><dependencies><dependency><groupId>com.bianyi</groupId><artifactId>health_interface</artifactId><version>1.0-SNAPSHOT</version></dependency></dependencies><build><plugins><plugin><groupId>org.apache.tomcat.maven</groupId><artifactId>tomcat7-maven-plugin</artifactId><configuration><!-- 指定端口 --><port>80</port><!-- 请求路径 --><path>/</path></configuration></plugin></plugins></build>
</project>

静态资源(CSS、html、img等,详见资料):

web.xml:

<!DOCTYPE web-app PUBLIC"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN""http://java.sun.com/dtd/web-app_2_3.dtd" ><web-app><display-name>Archetype Created Web Application</display-name><!-- 解决post乱码 --><filter><filter-name>CharacterEncodingFilter</filter-name><filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class><init-param><param-name>encoding</param-name><param-value>utf-8</param-value></init-param><init-param><param-name>forceEncoding</param-name><param-value>true</param-value></init-param></filter><filter-mapping><filter-name>CharacterEncodingFilter</filter-name><url-pattern>/*</url-pattern></filter-mapping><servlet><servlet-name>springmvc</servlet-name><servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class><!-- 指定加载的配置文件 ,通过参数contextConfigLocation加载 --><init-param><param-name>contextConfigLocation</param-name><param-value>classpath:springmvc.xml</param-value></init-param><load-on-startup>1</load-on-startup></servlet><servlet-mapping><servlet-name>springmvc</servlet-name><url-pattern>*.do</url-pattern></servlet-mapping><welcome-file-list><welcome-file>/pages/index.html</welcome-file></welcome-file-list>
</web-app>

springmvc.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:p="http://www.springframework.org/schema/p"xmlns:context="http://www.springframework.org/schema/context"xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"xmlns:mvc="http://www.springframework.org/schema/mvc"xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans.xsdhttp://www.springframework.org/schema/mvchttp://www.springframework.org/schema/mvc/spring-mvc.xsdhttp://code.alibabatech.com/schema/dubbohttp://code.alibabatech.com/schema/dubbo/dubbo.xsdhttp://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context.xsd"><mvc:annotation-driven><mvc:message-converters register-defaults="true"><bean class="com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter"><property name="supportedMediaTypes" value="application/json"/><property name="features"><list><value>WriteMapNullValue</value><value>WriteDateUseDateFormat</value></list></property></bean></mvc:message-converters></mvc:annotation-driven><!-- 指定应用名称 --><dubbo:application name="health_mobile" /><!--指定服务注册中心地址--><dubbo:registry address="zookeeper://127.0.0.1:2181"/><!--批量扫描--><dubbo:annotation package="com.bianyi.controller" /><!--超时全局设置 10分钟check=false 不检查服务提供方,开发阶段建议设置为falsecheck=true 启动时检查服务提供方,如果服务提供方没有启动则报错--><dubbo:consumer timeout="600000" check="false"/><import resource="spring-redis.xml"></import>
</beans>

spring-redis.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:p="http://www.springframework.org/schema/p"xmlns:context="http://www.springframework.org/schema/context"xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"xmlns:mvc="http://www.springframework.org/schema/mvc"xsi:schemaLocation="http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/spring-beans.xsdhttp://www.springframework.org/schema/mvchttp://www.springframework.org/schema/mvc/spring-mvc.xsdhttp://code.alibabatech.com/schema/dubbohttp://code.alibabatech.com/schema/dubbo/dubbo.xsdhttp://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context.xsd"><context:property-placeholder location="classpath:redis.properties" /><!--Jedis连接池的相关配置--><bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig"><property name="maxTotal"><value>${redis.pool.maxActive}</value></property><property name="maxIdle"><value>${redis.pool.maxIdle}</value></property><property name="testOnBorrow" value="true"/><property name="testOnReturn" value="true"/></bean><bean id="jedisPool" class="redis.clients.jedis.JedisPool"><constructor-arg name="poolConfig" ref="jedisPoolConfig" /><constructor-arg name="host" value="${redis.host}" /><constructor-arg name="port" value="${redis.port}" type="int" /><constructor-arg name="timeout" value="${redis.timeout}" type="int" /></bean>
</beans>

redis.properties:

#最大分配的对象数
redis.pool.maxActive=200
#最大能够保持idel状态的对象数
redis.pool.maxIdle=50
redis.pool.minIdle=10
redis.pool.maxWaitMillis=20000
#当池内没有返回对象时,最大等待时间
redis.pool.maxWait=300#格式:redis://:[密码]@[服务器地址]:[端口]/[db index]
#redis.uri = redis://:12345@127.0.0.1:6379/0redis.host = 127.0.0.1
redis.port = 6379
redis.timeout = 30000

log4j.properties:

### direct log messages to stdout ###
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.err
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n### direct messages to file mylog.log ###
log4j.appender.file=org.apache.log4j.FileAppender
log4j.appender.file.File=c:\\mylog.log
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n### set log levels - for more verbose logging change 'info' to 'debug' ###log4j.rootLogger=debug, stdout

最后定义目录结构如下:

三、套餐列表页面动态展示

移动端首页为http://192.168.7.45:84/pages/index.html,效果如下:

点击体检预约直接跳转到体检套餐列表页面(/pages/setmeal.html)
1.点击体检预约,整个前端页面的执行流程

2.完善SetmealController

package com.oracle.controller;import com.alibaba.dubbo.config.annotation.Reference;
import com.oracle.constant.MessageConstant;
import com.oracle.entity.Result;
import com.oracle.pojo.Setmeal;
import com.oracle.service.SetmealService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;import java.util.List;@RestController
@RequestMapping("/setmeal")
public class SetmealController {@ReferenceSetmealService setmealService;/*** 查询所有的套餐信息* @return*/@RequestMapping("/getAllSetmeal")public Result getAllSetmeal(){try {List<Setmeal> list = setmealService.findAllFromSetmeal();return new Result(true, MessageConstant.GET_SETMEAL_LIST_SUCCESS,list);} catch (Exception e) {e.printStackTrace();return new Result(false, MessageConstant.GET_SETMEAL_LIST_FAIL);}}
}

由于项目采用的分布式的框架,所以不管是后台管理界面还是移动端界面获取的服务是在同一个接口里面的方法

3.完善SetmealService

package com.oracle.service;import com.oracle.entity.PageResult;
import com.oracle.entity.QueryPageBean;
import com.oracle.pojo.CheckGroup;
import com.oracle.pojo.Setmeal;import java.util.List;public interface SetmealService {/*打开新增套餐,从检查组中找出所有的信息显示*/List<CheckGroup> findAllFromCheckGroup();/*从套餐中查出信息然后进行分页展示*/PageResult findPageFromSetMeal(QueryPageBean queryPageBean);/*新增套餐*/void addSetmeal(Setmeal setmeal, Integer[] checkgroupIds);/*移动端获取所有的套餐信息*/List<Setmeal> findAllFromSetmeal();
}

4.完善SetmealServiceImpl

package com.oracle.service;import com.alibaba.dubbo.config.annotation.Service;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.oracle.constant.RedisConstant;
import com.oracle.dao.SetmealDao;
import com.oracle.entity.PageResult;
import com.oracle.entity.QueryPageBean;
import com.oracle.pojo.CheckGroup;
import com.oracle.pojo.Setmeal;
import org.springframework.beans.factory.annotation.Autowired;
import redis.clients.jedis.JedisPool;import java.util.HashMap;
import java.util.List;
import java.util.Map;@Service(interfaceClass = SetmealService.class)
public class SetmealServiceImpl implements SetmealService {@AutowiredSetmealDao setmealDao;@AutowiredJedisPool jedisPool;@Overridepublic List<CheckGroup> findAllFromCheckGroup() {return setmealDao.findAllFromCheckGroup();}@Overridepublic PageResult findPageFromSetMeal(QueryPageBean queryPageBean) {Integer currentPage = queryPageBean.getCurrentPage();Integer pageSize = queryPageBean.getPageSize();String queryString = queryPageBean.getQueryString();PageHelper.startPage(currentPage,pageSize);Page<Setmeal> setmealPage=setmealDao.findPageFromSetMeal(queryString);return new PageResult(setmealPage.getTotal(),setmealPage);}@Overridepublic void addSetmeal(Setmeal setmeal, Integer[] checkgroupIds) {/*先将套餐信息添加进t_setmeal中,然后将对应关系封装进t_setmeal_checkgroup中*/setmealDao.addSetmeal(setmeal);/*将保存到数据库中的图片的名称存入redis中的另一个set集合中*/jedisPool.getResource().sadd(RedisConstant.SETMEAL_PIC_DB_RESOURCES,setmeal.getImg());/*获取保存在数据库中的ID*/Integer setmealId = setmeal.getId();/*通过一个方法将套餐信息与检查组的多对多关系存储进t_setmeal_checkgroup*/this.setSetmealAndCheckgroup(setmealId,checkgroupIds);}@Overridepublic Setmeal findSetmealById(Integer id) {return setmealDao.findSetmealById(id);}private void setSetmealAndCheckgroup(Integer setmealId, Integer[] checkgroupIds) {if(checkgroupIds!=null && checkgroupIds.length>0){for (Integer checkgroupId : checkgroupIds) {Map<String,Integer> map=new HashMap<String,Integer>();map.put("setmealId",setmealId);map.put("checkgroupId",checkgroupId);/*将put集合中的两个值保存在套餐的多对多关系中*/setmealDao.addSetmealAndCheckgroup(map);}}}/*上面是提供给后台管理人员的服务,下面这个是提供给移动端(用户)的服务*/@Overridepublic List<Setmeal> findAllFromSetmeal() {return setmealDao.findAllFromSetmeal();}
}

5.完善SetmealDao

package com.oracle.dao;import com.github.pagehelper.Page;
import com.oracle.pojo.CheckGroup;
import com.oracle.pojo.Setmeal;
import org.springframework.stereotype.Repository;import java.util.List;
import java.util.Map;@Repository
public interface SetmealDao {/*打开新增套餐,从检查组中找出所有的信息显示*/List<CheckGroup> findAllFromCheckGroup();/*从套餐中查出信息然后进行分页展示*/Page<Setmeal> findPageFromSetMeal(String queryString);/*将套餐信息添加进t_setmeal中*/void addSetmeal(Setmeal setmeal);/*将套餐信息和检查组的多对多关系保存至t_setmeal_checkgroup*/void addSetmealAndCheckgroup(Map<String, Integer> map);/*移动端获取所有的套餐信息*/List<Setmeal> findAllFromSetmeal();
}

6.完善SetmealDao的映射文件

<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.oracle.dao.SetmealDao"><!--查询所有的检查项--><select id="findAllFromCheckGroup" resultType="com.oracle.pojo.CheckGroup">select * from t_checkgroup</select><!--分页查询所有的套餐--><select id="findPageFromSetMeal" parameterType="String" resultType="com.oracle.pojo.Setmeal">select * from t_setmeal</select><!--添加套餐信息至t_setmeal中--><insert id="addSetmeal" parameterType="com.oracle.pojo.Setmeal"><selectKey keyColumn="id" keyProperty="id" order="AFTER" resultType="Integer">SELECT LAST_INSERT_ID()</selectKey>insert into t_setmeal values(null,#{name},#{code},#{helpCode},#{sex},#{age},#{price},#{remark},#{attention},#{img})</insert><!--将套餐信息和检查组的多对多关系保存至t_setmeal_checkgroup--><insert id="addSetmealAndCheckgroup" parameterType="map">insert into t_setmeal_checkgroup(setmeal_id,checkgroup_id)values(#{setmealId},#{checkgroupId})</insert><!--移动端获取所有的套餐信息--><select id="findAllFromSetmeal" resultType="com.oracle.pojo.Setmeal">select * from t_setmeal</select>
</mapper>

7.启动测试

四、套餐详情页面动态展示

  • 前面我们已经完成了体检套餐列表页面动态展示,点击其中任意一个套餐则跳转到对应1.4.1 的套餐详情页面/pages/setmeal_detail.html,并且会携带此套餐的id作为参数提交。
  • 请求路径格式:http://localhost/pages/setmeal_detail.html?id=10
  • 在套餐详情页面需要展示当前套餐的信息(包括图片、套餐名称、套餐介绍、适用性 别、适用年龄)、此套餐包含的检查组信息、检查组包含的检查项信息等。

1.点击任意一个套餐,进入setmeal_detail界面然后显示该套餐包含的检查组、检查项的执行流程

2.完善SetmealController

package com.oracle.controller;import com.alibaba.dubbo.config.annotation.Reference;
import com.oracle.constant.MessageConstant;
import com.oracle.entity.Result;
import com.oracle.pojo.Setmeal;
import com.oracle.service.SetmealService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;import java.util.List;@RestController
@RequestMapping("/setmeal")
public class SetmealController {@ReferenceSetmealService setmealService;/*** 查询所有的套餐信息* @return*/@RequestMapping("/getAllSetmeal")public Result getAllSetmeal(){try {List<Setmeal> list = setmealService.findAllFromSetmeal();return new Result(true, MessageConstant.GET_SETMEAL_LIST_SUCCESS,list);} catch (Exception e) {e.printStackTrace();return new Result(false, MessageConstant.GET_SETMEAL_LIST_FAIL);}}/*** 根据套餐id查询套餐详情* @param id* @return*/@RequestMapping("/findById")public Result findById(Integer id){try {Setmeal setmeal = setmealService.findSetmealById(id);return new Result(true,MessageConstant.QUERY_SETMEAL_SUCCESS,setmeal);} catch (Exception e) {e.printStackTrace();return new Result(false,MessageConstant.QUERY_SETMEAL_FAIL);}}
}

3.完善SetmealService

package com.oracle.service;import com.oracle.entity.PageResult;
import com.oracle.entity.QueryPageBean;
import com.oracle.pojo.CheckGroup;
import com.oracle.pojo.Setmeal;import java.util.List;public interface SetmealService {/*打开新增套餐,从检查组中找出所有的信息显示*/List<CheckGroup> findAllFromCheckGroup();/*从套餐中查出信息然后进行分页展示*/PageResult findPageFromSetMeal(QueryPageBean queryPageBean);/*新增套餐*/void addSetmeal(Setmeal setmeal, Integer[] checkgroupIds);/*移动端获取所有的套餐信息*/List<Setmeal> findAllFromSetmeal();/*移动端根据setmeal的id获取它下面的checkGroup和checkItem*/Setmeal findSetmealById(Integer id);
}

4.完善SetmealServiceImpl

package com.oracle.service;import com.alibaba.dubbo.config.annotation.Service;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.oracle.constant.RedisConstant;
import com.oracle.dao.SetmealDao;
import com.oracle.entity.PageResult;
import com.oracle.entity.QueryPageBean;
import com.oracle.pojo.CheckGroup;
import com.oracle.pojo.Setmeal;
import org.springframework.beans.factory.annotation.Autowired;
import redis.clients.jedis.JedisPool;import java.util.HashMap;
import java.util.List;
import java.util.Map;@Service(interfaceClass = SetmealService.class)
public class SetmealServiceImpl implements SetmealService {@AutowiredSetmealDao setmealDao;@AutowiredJedisPool jedisPool;@Overridepublic List<CheckGroup> findAllFromCheckGroup() {return setmealDao.findAllFromCheckGroup();}@Overridepublic PageResult findPageFromSetMeal(QueryPageBean queryPageBean) {Integer currentPage = queryPageBean.getCurrentPage();Integer pageSize = queryPageBean.getPageSize();String queryString = queryPageBean.getQueryString();PageHelper.startPage(currentPage,pageSize);Page<Setmeal> setmealPage=setmealDao.findPageFromSetMeal(queryString);return new PageResult(setmealPage.getTotal(),setmealPage);}@Overridepublic void addSetmeal(Setmeal setmeal, Integer[] checkgroupIds) {/*先将套餐信息添加进t_setmeal中,然后将对应关系封装进t_setmeal_checkgroup中*/setmealDao.addSetmeal(setmeal);/*将保存到数据库中的图片的名称存入redis中的另一个set集合中*/jedisPool.getResource().sadd(RedisConstant.SETMEAL_PIC_DB_RESOURCES,setmeal.getImg());/*获取保存在数据库中的ID*/Integer setmealId = setmeal.getId();/*通过一个方法将套餐信息与检查组的多对多关系存储进t_setmeal_checkgroup*/this.setSetmealAndCheckgroup(setmealId,checkgroupIds);}@Overridepublic Setmeal findSetmealById(Integer id) {return setmealDao.findSetmealById(id);}private void setSetmealAndCheckgroup(Integer setmealId, Integer[] checkgroupIds) {if(checkgroupIds!=null && checkgroupIds.length>0){for (Integer checkgroupId : checkgroupIds) {Map<String,Integer> map=new HashMap<String,Integer>();map.put("setmealId",setmealId);map.put("checkgroupId",checkgroupId);/*将put集合中的两个值保存在套餐的多对多关系中*/setmealDao.addSetmealAndCheckgroup(map);}}}/*上面是提供给后台管理人员的服务,下面这个是提供给移动端(用户)的服务*/@Overridepublic List<Setmeal> findAllFromSetmeal() {return setmealDao.findAllFromSetmeal();}@Overridepublic Setmeal findSetmealById(Integer id) {return setmealDao.findSetmealById(id);}
}

5.完善SetmealDao

package com.oracle.dao;import com.github.pagehelper.Page;
import com.oracle.pojo.CheckGroup;
import com.oracle.pojo.Setmeal;
import org.springframework.stereotype.Repository;import java.util.List;
import java.util.Map;@Repository
public interface SetmealDao {/*打开新增套餐,从检查组中找出所有的信息显示*/List<CheckGroup> findAllFromCheckGroup();/*从套餐中查出信息然后进行分页展示*/Page<Setmeal> findPageFromSetMeal(String queryString);/*将套餐信息添加进t_setmeal中*/void addSetmeal(Setmeal setmeal);/*将套餐信息和检查组的多对多关系保存至t_setmeal_checkgroup*/void addSetmealAndCheckgroup(Map<String, Integer> map);/*移动端获取所有的套餐信息*/List<Setmeal> findAllFromSetmeal();/*移动端根据setmeal的id获取它下面的checkGroup和checkItem*/Setmeal findSetmealById(Integer id);
}

从setmealDao的映射文件开始进行五表联查

6.完善SetmealDao的映射文件

<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.oracle.dao.SetmealDao"><!--查询所有的检查项--><select id="findAllFromCheckGroup" resultType="com.oracle.pojo.CheckGroup">select * from t_checkgroup</select><!--分页查询所有的套餐--><select id="findPageFromSetMeal" parameterType="String" resultType="com.oracle.pojo.Setmeal">select * from t_setmeal</select><!--添加套餐信息至t_setmeal中--><insert id="addSetmeal" parameterType="com.oracle.pojo.Setmeal"><selectKey keyColumn="id" keyProperty="id" order="AFTER" resultType="Integer">SELECT LAST_INSERT_ID()</selectKey>insert into t_setmeal values(null,#{name},#{code},#{helpCode},#{sex},#{age},#{price},#{remark},#{attention},#{img})</insert><!--将套餐信息和检查组的多对多关系保存至t_setmeal_checkgroup--><insert id="addSetmealAndCheckgroup" parameterType="map">insert into t_setmeal_checkgroup(setmeal_id,checkgroup_id)values(#{setmealId},#{checkgroupId})</insert><!--移动端获取所有的套餐信息--><select id="findAllFromSetmeal" resultType="com.oracle.pojo.Setmeal">select * from t_setmeal</select><!--根据setmeal的id获取setmeal的所有基本信息--><select id="findSetmealById" parameterType="Integer" resultMap="findSetMealById">select * from t_setmeal where id=#{id}</select><resultMap id="findSetMealById" type="com.oracle.pojo.Setmeal"><id column="id" property="id"></id><result column="name" property="name"></result><result column="code" property="code"></result><result column="helpCode" property="helpCode"></result><result column="sex" property="sex"></result><result column="age" property="age"></result><result column="price" property="price"></result><result column="remark" property="remark"></result><result column="attention" property="attention"></result><result column="img" property="img"></result><collection property="checkGroups" column="id" ofType="com.oracle.pojo.CheckGroup" select="com.oracle.dao.CheckGroupDao.findCheckGroupBySetmealId"></collection></resultMap>
</mapper>

7.完善CheckGroupDao

package com.oracle.dao;import com.github.pagehelper.Page;
import com.oracle.pojo.CheckGroup;
import com.oracle.pojo.CheckItem;
import org.springframework.stereotype.Repository;import java.util.List;
import java.util.Map;@Repository
public interface CheckGroupDao {/*根据setmeal的id从关联表中查找出所有的checkgroup的id的集合,然后根据id一个一个去checkgroup中获取检查组的基本信息*/CheckGroup findCheckGroupBySetmealId(Integer id);
}

8.完善CheckGroupDao的映射文件

<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.oracle.dao.CheckGroupDao"><select id="findCheckGroupBySetmealId" parameterType="Integer" resultMap="findCheckGroupBySetmealId">select * from t_checkgroup where id in(select checkgroup_id from t_setmeal_checkgroup WHERE setmeal_id =#{id})</select><resultMap id="findCheckGroupBySetmealId" type="com.oracle.pojo.CheckGroup"><id column="id" property="id"></id><result column="code" property="code"></result><result column="name" property="name"></result><result column="helpCode" property="helpCode"></result><result column="sex" property="sex"></result><result column="remark" property="remark"></result><result column="attention" property="attention"></result><collection property="checkItems" column="id" ofType="com.oracle.pojo.CheckItem"select="com.oracle.dao.CheckItemDao.findCheckItemByCheckGroupId"></collection></resultMap>
</mapper>

9.完善CheckItemDao

package com.oracle.dao;import com.github.pagehelper.Page;
import com.oracle.pojo.CheckItem;
import org.springframework.stereotype.Repository;@Repository
public interface CheckItemDao {/*根据用户选择套餐的id得到checkGroup的id,然后根据checkgroup的id得到checkitem的基本信息*/CheckItem findCheckItemByCheckGroupId(Integer id);
}

10.完善CheckItemDao的映射文件

<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.oracle.dao.CheckItemDao"><select id="findCheckItemByCheckGroupId" parameterType="Integer" resultType="com.oracle.pojo.CheckItem">select * from t_checkitem where id in(select checkitem_id from t_checkgroup_checkitem where checkgroup_id=#{id})</select>
</mapper>

12.编写测试代码进行测试

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configurationPUBLIC "-//mybatis.org//DTD Config 3.0//EN""http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration><plugins><!-- com.github.pagehelper 为 PageHelper 类所在包名 --><plugin interceptor="com.github.pagehelper.PageInterceptor"></plugin></plugins><!--配置环境信息--><environments default="mysql"><environment id="mysql"><transactionManager type="JDBC"></transactionManager><dataSource type="POOLED"><property name="driver" value="com.mysql.jdbc.Driver"/><property name="url" value="jdbc:mysql://localhost:3306/health"/><property name="username" value="root"/><property name="password" value="123"/></dataSource></environment></environments><!--配置映射文件的位置--><mappers><mapper resource="com/oracle/dao/CheckItemDao.xml"></mapper><mapper resource="com/oracle/dao/CheckGroupDao.xml"></mapper><mapper resource="com/oracle/dao/SetmealDao.xml"></mapper><mapper resource="com/oracle/dao/OrderSettingDao.xml"></mapper></mappers>
</configuration>
package com.oracle.test;import com.oracle.dao.SetmealDao;
import com.oracle.pojo.CheckGroup;
import com.oracle.pojo.Setmeal;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.List;
import java.util.Map;public class TestMobileDao {public SqlSession sqlSession;public SetmealDao setmealDao;@Beforepublic void before() throws IOException {//1.启动mybatisInputStream resourceAsStream = Resources.getResourceAsStream("SqlMapConfigDao.xml");SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(resourceAsStream);sqlSession = sqlSessionFactory.openSession();setmealDao = sqlSession.getMapper(SetmealDao.class);}@Afterpublic void after(){sqlSession.close();}/*测试mapper文件中的查询是否可行*/@Testpublic void TestSetmealDao_findSetmealById(){Setmeal setmeal = setmealDao.findSetmealById(12);System.out.println(setmeal);}
}

13.启动测试

Setmeal{id=12, name='入职无忧体检套餐(男女通用)', code='0001', helpCode='RZTJ', sex='0', age='18-60', price=300.0, remark='入职体检套餐', attention='null', img='c420c66f-241b-42bf-be82-ec34210d76300.jpg', 
checkGroups=[CheckGroup{id=5, code='0001', name='一般检查', helpCode='YBJC', sex='0', remark='一般检查', attention='无', checkItems=[CheckItem{id=31, code='0004', name='心肺复苏', sex='1', age='0-100', price=51.0, type='2', remark='心肺复苏', attention='无'}, CheckItem{id=33, code='0006', name='裸视力(右)', sex='0', age='0-100', price=5.0, type='1', remark='裸视力(右)', attention='无'}]}, CheckGroup{id=6, code='0002', name='视力色觉', helpCode='SLSJ', sex='0', remark='视力色觉', attention='null', checkItems=[CheckItem{id=33, code='0006', name='裸视力(右)', sex='0', age='0-100', price=5.0, type='1', remark='裸视力(右)', attention='无'}, CheckItem{id=34, code='0007', name='裸视力(左)', sex='0', age='0-100', price=5.0, type='1', remark='裸视力(左)', attention='无'}, CheckItem{id=35, code='0008', name='矫正视力(右)', sex='0', age='0-100', price=5.0, type='1', remark='矫正视力(右)', attention='无'}, CheckItem{id=36, code='0009', name='矫正视力(左)', sex='0', age='0-100', price=5.0, type='1', remark='矫正视力(左)', attention='无'}, CheckItem{id=37, code='0010', name='色觉', sex='0', age='0-100', price=5.0, type='1', remark='色觉', attention='无'}]}, CheckGroup{id=7, code='0003', name='血常规', helpCode='XCG', sex='0', remark='血常规', attention='null', checkItems=[CheckItem{id=38, code='0011', name='白细胞计数', sex='0', age='0-100', price=10.0, type='2', remark='白细胞计数', attention='无'}, CheckItem{id=39, code='0012', name='红细胞计数', sex='0', age='0-100', price=10.0, type='2', remark='红细胞计数', attention='null'},CheckItem{id=40, code='0013', name='血红蛋白', sex='0', age='0-100', price=10.0, type='2', remark='血红蛋白', attention='null'}, CheckItem{id=41, code='0014', name='红细胞压积', sex='0', age='0-100', price=10.0, type='2', remark='红细胞压积', attention='null'}, CheckItem{id=42, code='0015', name='平均红细胞体积', sex='0', age='0-100', price=10.0, type='2', remark='平均红细胞体积', attention='null'}, CheckItem{id=43, code='0016', name='平均红细胞血红蛋白含量', sex='0', age='0-100', price=10.0, type='2', remark='平均红细胞血红蛋白含量', attention='null'}, CheckItem{id=44, code='0017', name='平均红细胞血红蛋白浓度', sex='0', age='0-100', price=10.0, type='2', remark='平均红细胞血红蛋白浓度', attention='null'}, CheckItem{id=45, code='0018', name='红细胞分布宽度-变异系数', sex='0', age='0-100', price=10.0, type='2', remark='红细胞分布宽度-变异系数', attention='null'}, CheckItem{id=46, code='0019', name='血小板计数', sex='0', age='0-100', price=10.0, type='2', remark='血小板计数', attention='null'}, CheckItem{id=47, code='0020', name='平均血小板体积', sex='0', age='0-100', price=10.0, type='2', remark='平均血小板体积', attention='null'}, CheckItem{id=48, code='0021', name='血小板分布宽度', sex='0', age='0-100', price=10.0, type='2', remark='血小板分布宽度', attention='null'}, CheckItem{id=49, code='0022', name='淋巴细胞百分比', sex='0', age='0-100', price=10.0, type='2', remark='淋巴细胞百分比', attention='null'}, CheckItem{id=50, code='0023', name='中间细胞百分比', sex='0', age='0-100', price=10.0, type='2', remark='中间细胞百分比', attention='null'}, CheckItem{id=51, code='0024', name='中性粒细胞百分比', sex='0', age='0-100', price=10.0, type='2', remark='中性粒细胞百分比', attention='null'}, CheckItem{id=52, code='0025', name='淋巴细胞绝对值', sex='0', age='0-100', price=10.0, type='2', remark='淋巴细胞绝对值', attention='null'}, CheckItem{id=53, code='0026', name='中间细胞绝对值', sex='0', age='0-100', price=10.0, type='2', remark='中间细胞绝对值', attention='null'}, CheckItem{id=54, code='0027', name='中性粒细胞绝对值', sex='0', age='0-100', price=10.0, type='2', remark='中性粒细胞绝对值', attention='null'}, CheckItem{id=55, code='0028', name='红细胞分布宽度-标准差', sex='0', age='0-100', price=10.0, type='2', remark='红细胞分布宽度-标准差', attention='null'},CheckItem{id=56, code='0029', name='血小板压积', sex='0', age='0-100', price=10.0, type='2', remark='血小板压积', attention='null'}]}, ]
}

五、短信发送

1.短信服务介绍

  • 目前市面上有很多第三方提供的短信服务,这些第三方短信服务会和各个运营商(移 动、联通、电信)对接,我们只需要注册成为会员并且按照提供的开发文档进行调用就 可以发送短信。需要说明的是这些短信服务都是收费的服务。
  • 本项目短信发送我们选择的是阿里云提供的短信服务。
  • 短信服务(Short Message Service)是阿里云为用户提供的一种通信服务的能力,支持快速发送短信验证码、短信通知等。 三网合一专属通道,与工信部携号转网平台实时互联。电信级运维保障,实时监控自动切换,到达率高达99%。短信服务API提供短信发送、发送状态查询、短信批量发送等能力,在短信服务控制台上添加签名、模板并通过审核之后,可以调用短信服务API完成短信发送等操作。

2.注册阿里云账号:阿里云官网:https://www.aliyun.com/

验证通过之后,然后快速实名认证。

点击个人实名认证,推荐使用个人支付宝授权认证

注册短信业务:





创建AccessKey



3.发送短信

在health_common工程中添加依赖:

<dependency><groupId>com.aliyun</groupId><artifactId>aliyun-java-sdk-core</artifactId><version>3.3.1</version>
</dependency>
<dependency><groupId>com.aliyun</groupId><artifactId>aliyun-java-sdk-dysmsapi</artifactId><version>1.0.0</version>
</dependency>

封装工具类,前面已经导入SMSUtis工具类。
测试短信是否能够成功发送

package com.oracle.utils;import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.IAcsClient;
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest;
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
import com.aliyuncs.exceptions.ClientException;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.profile.DefaultProfile;
import com.aliyuncs.profile.IClientProfile;/*** 短信发送工具类*/
public class SMSUtils {public static final String VALIDATE_CODE = "SMS_193233372";//发送短信验证码public static final String ORDER_NOTICE = "SMS_159771588";//体检预约成功通知/*** 发送短信* @param phoneNumbers* @param param* @throws ClientException*/public static void sendShortMessage(String templateCode,String phoneNumbers,String param) throws ClientException {// 设置超时时间-可自行调整System.setProperty("sun.net.client.defaultConnectTimeout", "10000");System.setProperty("sun.net.client.defaultReadTimeout", "10000");// 初始化ascClient需要的几个参数final String product = "Dysmsapi";// 短信API产品名称(短信产品名固定,无需修改)final String domain = "dysmsapi.aliyuncs.com";// 短信API产品域名(接口地址固定,无需修改)// 替换成你的AKfinal String accessKeyId = "LTAI4GEC5ULqFHxSsxXUPS4P";// 你的accessKeyId,参考本文档步骤2final String accessKeySecret = "QxCqQM6TXXyjv8ZbIEC4NgCDkMPdID";// 你的accessKeySecret,参考本文档步骤2// 初始化ascClient,暂时不支持多region(请勿修改)IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKeyId, accessKeySecret);DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", product, domain);IAcsClient acsClient = new DefaultAcsClient(profile);// 组装请求对象SendSmsRequest request = new SendSmsRequest();// 使用post提交request.setMethod(MethodType.POST);// 必填:待发送手机号。支持以逗号分隔的形式进行批量调用,批量上限为1000个手机号码,批量调用相对于单条调用及时性稍有延迟,验证码类型的短信推荐使用单条调用的方式request.setPhoneNumbers(phoneNumbers);// 必填:短信签名-可在短信控制台中找到request.setSignName("FlyHigh健康管理云");// 必填:短信模板-可在短信控制台中找到request.setTemplateCode(templateCode);// 可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为// 友情提示:如果JSON中需要带换行符,请参照标准的JSON协议对换行符的要求,比如短信内容中包含\r\n的情况在JSON中需要表示成\\r\\n,否则会导致JSON在服务端解析失败request.setTemplateParam("{\"code\":\""+param+"\"}");// 可选-上行短信扩展码(扩展码字段控制在7位或以下,无特殊需求用户请忽略此字段)// request.setSmsUpExtendCode("90997");// 可选:outId为提供给业务方扩展字段,最终在短信回执消息中将此值带回给调用者// request.setOutId("yourOutId");// 请求失败这里会抛ClientException异常SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request);if (sendSmsResponse.getCode() != null && sendSmsResponse.getCode().equals("OK")) {// 请求成功System.out.println("请求成功");}}
}
package com.oracle.test;import com.oracle.utils.SMSUtils;
import com.oracle.utils.ValidateCodeUtils;
import org.junit.Test;public class TestSMSUtis {@Testpublic void test() throws Exception{SMSUtils.sendShortMessage("SMS_193233372","18573144847","1234");}
}

短信发送工具类注意事项

项目几个容易忽略的出错的地方




查看全文
如若内容造成侵权/违法违规/事实不符,请联系编程学习网邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

相关文章

  1. 海龟画图,颜色的单词

    海龟画图,颜色的单词 turtle.color(“颜色”) 是turtle指令中非常实用的一项,它可以让你的图形变得绚丽多彩,但是,当你使用turtle.color(“颜色”) 时,发现你只会red,green,yellow,blue 这些单词,这无疑会让你可以选择的颜色大大减少,而在这里,我将分享一些颜色的英语单…...

    2024/4/15 4:12:24
  2. selenium自动化测试的入门级教程!必看!

    1.安装pip install selenium2.准备驱动当前支持诸如chrome,firefox,Edge,IE等主流浏览器,前提是要下载浏览器驱动(驱动下载地址上网自行百度),否则会报诸如以下此类的错误:selenium.common.exceptions.WebDriverException: Message: IEDriverServer.exe executable needs to …...

    2024/4/15 4:12:25
  3. python中的GIL锁

    python中的GIL锁(全局解释器锁) 1.首先,Python语言和GIL解释器锁没有关系,仅仅是由于历史原因在Cpython虚拟机(解释器)中难以移除GIL。而也只是在用C语言编写的python解释器中存在这个问题。 2.GIL:全局解释器锁。每个线程在执行的过程都需要先获取GIL,保证同一时刻只有一…...

    2024/4/15 4:12:23
  4. 关于echarts的使用小白必看08

    A.下载和引入echarts.min.js <script src="echarts.min.js"></script> B.需要准备一个展示图表的容器(盒子),盒子必须要有宽高 <div class="box" style="width:600px;height:450px;"></div> C.初始化echarts var myCha…...

    2024/5/7 13:01:46
  5. CSS语法及常用选择器

    文章目录CSS基础知识css是什么?CSS的格式 css可以出现的位置CSS的语法△CSS常用选择器一:元素选择器二:id选择器三:类选择器四:并集选择器(选择器分组)五:交集选择器(复合选择器)六:通配选择器七:后代元素选择器八:子元素选择器九:伪类选择器十:伪元素选择器十…...

    2024/4/18 4:44:33
  6. Os 7 mysql主从复制

    使用yum安装部署mysql两台 [root@localhost ~]# yum -y install mariadb mariadb-server 查看mysql的版本信息 [root@localhost ~]# mysql -V 配置两台mysql [root@localhost ~]# vim /etc/my.cnf server-id=1 log-bin=mysql-master-bin [root@localhost ~]# systemctl restart…...

    2024/4/19 17:11:24
  7. Java面试精选(4)分库分表之后,id 主键如何处理?

    问:分库分表之后,id 主键如何处理?面试官心理分析其实这是分库分表之后你必然要面对的一个问题,就是 id 咋生成?因为要是分成多个表之后,每个表都是从 1 开始累加,那肯定不对啊,需要一个全局唯一的 id 来支持。所以这都是你实际生产环境中必须考虑的问题。面试题剖析基…...

    2024/5/7 14:24:04
  8. 记一次zk集群引发的线上问题-排查策略

    故障描述(What happened):10:20 发布estate.realtor.ap.fdd服务(上线)10:25 发现服务发布失败,看了日志,发现一直在初始化dubbo,时间过长,关掉了健康检查(该服务较重,重启时间较长,健康检查最长120s超时)10:26 重新发布服务,发布系统发布成功10:28 业务方发现二手房业务…...

    2024/4/16 15:46:11
  9. cpp-new与malloc delete与free区别

    malloc free 是stdlib库的函数 使用必须进行压栈出栈操作 new delete 是 c++的操作符 无需进行栈栈操作 且会再new是自动调用构造函数 delete调用析构函数 具体演示程序#define _CRT_SECURE_NO_WARNINGS#include <iostream> #include <string> #include <stdlib…...

    2024/4/18 15:49:03
  10. ARM 之十一__weak 和 __attribute__((weak)) 关键字的使用

    今天在使用 Keil (主要是 armcc 编译器)编译代码的时候遇到了有 __weak 关键字的函数不起作用的问题,甚是奇怪。之前对于 __weak 关键字一直是一个简单的认知:编译器自动使用没有 __weak 的同名函数(如果有的话)替换有 __weak 关键字的同名函数,__weak 函数可以没有定义…...

    2024/4/15 4:12:19
  11. Cookie简析

    一、PHP Cookie 1.参数2.删除cookie setcookie(account,false); setcookie(account); setcookie(account,ff,time()-1);注意:删除cookie里的值,删除的时候也要保持参数值一一对应 比如截图的cookie删除: setcookie(account,false,time(),/,php.test.com,false,true);3.cooki…...

    2024/4/16 7:53:52
  12. 缠论插件_缠论通达信_缠论量化

    经过多年优化实盘操作,搞定了缠论插件:1.打开看盘软件通达信,大智慧,KT交易师,期货博易大师,输入FB或FD或ZSLX,自动画笔线段中枢走势类型2.力度数字提示3.支持各周期笔或段条件选股,支持盘中预警,欢迎试用提一些好的优化建议。下载地址:https://pan.baidu.com/s/1882…...

    2024/4/15 4:12:16
  13. 【Java集合框架库】ArrayDeque类

    ArrayDeque类 ArrayDeque继承于AbstractCollection类,其同时实现了Deque接口。Queue的结构是一个单端的队列,从一端进另一端出,Deque是一个双端队列。而ArrayDeque是一个使用循环数组实现的双端队列了。双端队列可以实现单端队列的先入先出的方式,也可以实现栈结构的先入后…...

    2024/4/28 1:36:50
  14. P1116 车厢重组(洛谷)

    原题传送门思路:水题,用冒泡排序加个记录交换次数即可 代码参考 在这里插入代码片...

    2024/4/15 4:12:14
  15. php 字母+数字验证码(session)

    效果步骤①:开启session ②:生成图片 ③:生成字母和数字 ④:生成噪点 ⑤:生成线条 ⑥:输出并销毁①:开启session session_start();//开启session $code="";//用于存储生成的字母和数字,并保存在session中②:生成图片 $image=imagecreatetruecolor(100,30);/…...

    2024/4/15 4:12:18
  16. 理解证书验证系列——HTTPS

    1 加密方式 方法1 对称加密 这种方式加密和解密同用一个密钥。加密和解密都会用到密钥。没有密钥就无法对密码解密,反过来说,任何人只要持有密钥就能解密了。 以对称加密方式加密时必须将密钥也发给对方。可究竟怎样才能安全地转交?在互联网上转发密钥时,如果通信被监听那么…...

    2024/4/24 13:08:44
  17. 算法(Algorithm) 第四版

    1.第一章 2.第二章 3.第三章 4.第四章 5.第五章...

    2024/4/24 13:08:42
  18. MySql 5.8安装(Windows)

    到MySQL官网上下载数据库:https://dev.mysql.com/downloads/mysql/点击 Download 按钮进入下载页面,点击下图中的 No thanks, just start my download. 就可立即下载:下载完后,我们将 zip 包解压到相应的目录,这里我将解压后的文件夹放在 D:\mysql-8.0.11 下。 接下来我们需…...

    2024/4/24 13:08:41
  19. 数据的存储(1):字节序与比特序

    概述 在计算机的发展过程中,由于不同硬件体系在数据高低有效位及存储方式理解上的差异,出现了大端和小端这两种截然相反的对数据的位进行解释的模式。大小端模式本身没有优劣之分,但我们在开发过程中,需要时刻考虑设备大小端差异可能会对程序带来的影响,其中最典型的就是字…...

    2024/4/24 13:08:40
  20. 大疆无人机飞控系统的原理、组成及各传感器的作用

    ref:https://blog.csdn.net/weixin_42229404/article/details/81318779以前,搞无人机的十个人有八个是航空、气动、机械出身,更多考虑的是如何让飞机稳定飞起来、飞得更快、飞得更高。如今,随着芯片、人工智能、大数据技术的发展,无人机开始了智能化、终端化、集群化的趋势…...

    2024/4/24 13:08:39

最新文章

  1. Compose 状态管理

    文章目录 Compose 状态管理概述使用MutableStaterememberStatelessComposable & StatefulComposable状态提升rememberSaveable支持parceable不支持parceable 使用ViewModelViewModelProvider.Factory 使用Flow Compose 状态管理 概述 当应用程序的状态发生变化时&#xf…...

    2024/5/7 18:49:03
  2. 梯度消失和梯度爆炸的一些处理方法

    在这里是记录一下梯度消失或梯度爆炸的一些处理技巧。全当学习总结了如有错误还请留言&#xff0c;在此感激不尽。 权重和梯度的更新公式如下&#xff1a; w w − η ⋅ ∇ w w w - \eta \cdot \nabla w ww−η⋅∇w 个人通俗的理解梯度消失就是网络模型在反向求导的时候出…...

    2024/5/7 10:36:02
  3. MXNet库

    MXNet&#xff08;MatriX Network&#xff09;是一个开源的深度学习框架&#xff0c;最初由亚马逊公司开发并于2015年发布。它是一个高效、灵活且可扩展的框架&#xff0c;旨在支持大规模的分布式深度学习模型训练和部署。 以下是 MXNet 库的一些主要特点和组成部分&#xff1…...

    2024/5/7 14:16:22
  4. 勾八头歌之分类回归聚类

    一、机器学习概述 第1关机器学习概述 B AD B BC 第2关常见分类算法 #编码方式encodingutf8from sklearn.neighbors import KNeighborsClassifierdef knn(train_data,train_label,test_data):input:train_data用来训练的数据train_label用来训练的标签test_data用来测试的数据…...

    2024/5/6 7:12:35
  5. 【外汇早评】美通胀数据走低,美元调整

    原标题:【外汇早评】美通胀数据走低,美元调整昨日美国方面公布了新一期的核心PCE物价指数数据,同比增长1.6%,低于前值和预期值的1.7%,距离美联储的通胀目标2%继续走低,通胀压力较低,且此前美国一季度GDP初值中的消费部分下滑明显,因此市场对美联储后续更可能降息的政策…...

    2024/5/7 5:50:09
  6. 【原油贵金属周评】原油多头拥挤,价格调整

    原标题:【原油贵金属周评】原油多头拥挤,价格调整本周国际劳动节,我们喜迎四天假期,但是整个金融市场确实流动性充沛,大事频发,各个商品波动剧烈。美国方面,在本周四凌晨公布5月份的利率决议和新闻发布会,维持联邦基金利率在2.25%-2.50%不变,符合市场预期。同时美联储…...

    2024/5/7 9:45:25
  7. 【外汇周评】靓丽非农不及疲软通胀影响

    原标题:【外汇周评】靓丽非农不及疲软通胀影响在刚结束的周五,美国方面公布了新一期的非农就业数据,大幅好于前值和预期,新增就业重新回到20万以上。具体数据: 美国4月非农就业人口变动 26.3万人,预期 19万人,前值 19.6万人。 美国4月失业率 3.6%,预期 3.8%,前值 3…...

    2024/5/4 23:54:56
  8. 【原油贵金属早评】库存继续增加,油价收跌

    原标题:【原油贵金属早评】库存继续增加,油价收跌周三清晨公布美国当周API原油库存数据,上周原油库存增加281万桶至4.692亿桶,增幅超过预期的74.4万桶。且有消息人士称,沙特阿美据悉将于6月向亚洲炼油厂额外出售更多原油,印度炼油商预计将每日获得至多20万桶的额外原油供…...

    2024/5/7 14:25:14
  9. 【外汇早评】日本央行会议纪要不改日元强势

    原标题:【外汇早评】日本央行会议纪要不改日元强势近两日日元大幅走强与近期市场风险情绪上升,避险资金回流日元有关,也与前一段时间的美日贸易谈判给日本缓冲期,日本方面对汇率问题也避免继续贬值有关。虽然今日早间日本央行公布的利率会议纪要仍然是支持宽松政策,但这符…...

    2024/5/4 23:54:56
  10. 【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响

    原标题:【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响近日伊朗局势升温,导致市场担忧影响原油供给,油价试图反弹。此时OPEC表态稳定市场。据消息人士透露,沙特6月石油出口料将低于700万桶/日,沙特已经收到石油消费国提出的6月份扩大出口的“适度要求”,沙特将满…...

    2024/5/4 23:55:05
  11. 【外汇早评】美欲与伊朗重谈协议

    原标题:【外汇早评】美欲与伊朗重谈协议美国对伊朗的制裁遭到伊朗的抗议,昨日伊朗方面提出将部分退出伊核协议。而此行为又遭到欧洲方面对伊朗的谴责和警告,伊朗外长昨日回应称,欧洲国家履行它们的义务,伊核协议就能保证存续。据传闻伊朗的导弹已经对准了以色列和美国的航…...

    2024/5/4 23:54:56
  12. 【原油贵金属早评】波动率飙升,市场情绪动荡

    原标题:【原油贵金属早评】波动率飙升,市场情绪动荡因中美贸易谈判不安情绪影响,金融市场各资产品种出现明显的波动。随着美国与中方开启第十一轮谈判之际,美国按照既定计划向中国2000亿商品征收25%的关税,市场情绪有所平复,已经开始接受这一事实。虽然波动率-恐慌指数VI…...

    2024/5/7 11:36:39
  13. 【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试

    原标题:【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试美国和伊朗的局势继续升温,市场风险情绪上升,避险黄金有向上突破阻力的迹象。原油方面稍显平稳,近期美国和OPEC加大供给及市场需求回落的影响,伊朗局势并未推升油价走强。近期中美贸易谈判摩擦再度升级,美国对中…...

    2024/5/4 23:54:56
  14. 【原油贵金属早评】市场情绪继续恶化,黄金上破

    原标题:【原油贵金属早评】市场情绪继续恶化,黄金上破周初中国针对于美国加征关税的进行的反制措施引发市场情绪的大幅波动,人民币汇率出现大幅的贬值动能,金融市场受到非常明显的冲击。尤其是波动率起来之后,对于股市的表现尤其不安。隔夜美国股市出现明显的下行走势,这…...

    2024/5/6 1:40:42
  15. 【外汇早评】美伊僵持,风险情绪继续升温

    原标题:【外汇早评】美伊僵持,风险情绪继续升温昨日沙特两艘油轮再次发生爆炸事件,导致波斯湾局势进一步恶化,市场担忧美伊可能会出现摩擦生火,避险品种获得支撑,黄金和日元大幅走强。美指受中美贸易问题影响而在低位震荡。继5月12日,四艘商船在阿联酋领海附近的阿曼湾、…...

    2024/5/4 23:54:56
  16. 【原油贵金属早评】贸易冲突导致需求低迷,油价弱势

    原标题:【原油贵金属早评】贸易冲突导致需求低迷,油价弱势近日虽然伊朗局势升温,中东地区几起油船被袭击事件影响,但油价并未走高,而是出于调整结构中。由于市场预期局势失控的可能性较低,而中美贸易问题导致的全球经济衰退风险更大,需求会持续低迷,因此油价调整压力较…...

    2024/5/4 23:55:17
  17. 氧生福地 玩美北湖(上)——为时光守候两千年

    原标题:氧生福地 玩美北湖(上)——为时光守候两千年一次说走就走的旅行,只有一张高铁票的距离~ 所以,湖南郴州,我来了~ 从广州南站出发,一个半小时就到达郴州西站了。在动车上,同时改票的南风兄和我居然被分到了一个车厢,所以一路非常愉快地聊了过来。 挺好,最起…...

    2024/5/7 9:26:26
  18. 氧生福地 玩美北湖(中)——永春梯田里的美与鲜

    原标题:氧生福地 玩美北湖(中)——永春梯田里的美与鲜一觉醒来,因为大家太爱“美”照,在柳毅山庄去寻找龙女而错过了早餐时间。近十点,向导坏坏还是带着饥肠辘辘的我们去吃郴州最富有盛名的“鱼头粉”。说这是“十二分推荐”,到郴州必吃的美食之一。 哇塞!那个味美香甜…...

    2024/5/4 23:54:56
  19. 氧生福地 玩美北湖(下)——奔跑吧骚年!

    原标题:氧生福地 玩美北湖(下)——奔跑吧骚年!让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 啊……啊……啊 两…...

    2024/5/4 23:55:06
  20. 扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!

    原标题:扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!扒开伪装医用面膜,翻六倍价格宰客!当行业里的某一品项火爆了,就会有很多商家蹭热度,装逼忽悠,最近火爆朋友圈的医用面膜,被沾上了污点,到底怎么回事呢? “比普通面膜安全、效果好!痘痘、痘印、敏感肌都能用…...

    2024/5/5 8:13:33
  21. 「发现」铁皮石斛仙草之神奇功效用于医用面膜

    原标题:「发现」铁皮石斛仙草之神奇功效用于医用面膜丽彦妆铁皮石斛医用面膜|石斛多糖无菌修护补水贴19大优势: 1、铁皮石斛:自唐宋以来,一直被列为皇室贡品,铁皮石斛生于海拔1600米的悬崖峭壁之上,繁殖力差,产量极低,所以古代仅供皇室、贵族享用 2、铁皮石斛自古民间…...

    2024/5/4 23:55:16
  22. 丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者

    原标题:丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者【公司简介】 广州华彬企业隶属香港华彬集团有限公司,专注美业21年,其旗下品牌: 「圣茵美」私密荷尔蒙抗衰,产后修复 「圣仪轩」私密荷尔蒙抗衰,产后修复 「花茵莳」私密荷尔蒙抗衰,产后修复 「丽彦妆」专注医学护…...

    2024/5/4 23:54:58
  23. 广州械字号面膜生产厂家OEM/ODM4项须知!

    原标题:广州械字号面膜生产厂家OEM/ODM4项须知!广州械字号面膜生产厂家OEM/ODM流程及注意事项解读: 械字号医用面膜,其实在我国并没有严格的定义,通常我们说的医美面膜指的应该是一种「医用敷料」,也就是说,医用面膜其实算作「医疗器械」的一种,又称「医用冷敷贴」。 …...

    2024/5/6 21:42:42
  24. 械字号医用眼膜缓解用眼过度到底有无作用?

    原标题:械字号医用眼膜缓解用眼过度到底有无作用?医用眼膜/械字号眼膜/医用冷敷眼贴 凝胶层为亲水高分子材料,含70%以上的水分。体表皮肤温度传导到本产品的凝胶层,热量被凝胶内水分子吸收,通过水分的蒸发带走大量的热量,可迅速地降低体表皮肤局部温度,减轻局部皮肤的灼…...

    2024/5/4 23:54:56
  25. 配置失败还原请勿关闭计算机,电脑开机屏幕上面显示,配置失败还原更改 请勿关闭计算机 开不了机 这个问题怎么办...

    解析如下&#xff1a;1、长按电脑电源键直至关机&#xff0c;然后再按一次电源健重启电脑&#xff0c;按F8健进入安全模式2、安全模式下进入Windows系统桌面后&#xff0c;按住“winR”打开运行窗口&#xff0c;输入“services.msc”打开服务设置3、在服务界面&#xff0c;选中…...

    2022/11/19 21:17:18
  26. 错误使用 reshape要执行 RESHAPE,请勿更改元素数目。

    %读入6幅图像&#xff08;每一幅图像的大小是564*564&#xff09; f1 imread(WashingtonDC_Band1_564.tif); subplot(3,2,1),imshow(f1); f2 imread(WashingtonDC_Band2_564.tif); subplot(3,2,2),imshow(f2); f3 imread(WashingtonDC_Band3_564.tif); subplot(3,2,3),imsho…...

    2022/11/19 21:17:16
  27. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机...

    win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”问题的解决方法在win7系统关机时如果有升级系统的或者其他需要会直接进入一个 等待界面&#xff0c;在等待界面中我们需要等待操作结束才能关机&#xff0c;虽然这比较麻烦&#xff0c;但是对系统进行配置和升级…...

    2022/11/19 21:17:15
  28. 台式电脑显示配置100%请勿关闭计算机,“准备配置windows 请勿关闭计算机”的解决方法...

    有不少用户在重装Win7系统或更新系统后会遇到“准备配置windows&#xff0c;请勿关闭计算机”的提示&#xff0c;要过很久才能进入系统&#xff0c;有的用户甚至几个小时也无法进入&#xff0c;下面就教大家这个问题的解决方法。第一种方法&#xff1a;我们首先在左下角的“开始…...

    2022/11/19 21:17:14
  29. win7 正在配置 请勿关闭计算机,怎么办Win7开机显示正在配置Windows Update请勿关机...

    置信有很多用户都跟小编一样遇到过这样的问题&#xff0c;电脑时发现开机屏幕显现“正在配置Windows Update&#xff0c;请勿关机”(如下图所示)&#xff0c;而且还需求等大约5分钟才干进入系统。这是怎样回事呢&#xff1f;一切都是正常操作的&#xff0c;为什么开时机呈现“正…...

    2022/11/19 21:17:13
  30. 准备配置windows 请勿关闭计算机 蓝屏,Win7开机总是出现提示“配置Windows请勿关机”...

    Win7系统开机启动时总是出现“配置Windows请勿关机”的提示&#xff0c;没过几秒后电脑自动重启&#xff0c;每次开机都这样无法进入系统&#xff0c;此时碰到这种现象的用户就可以使用以下5种方法解决问题。方法一&#xff1a;开机按下F8&#xff0c;在出现的Windows高级启动选…...

    2022/11/19 21:17:12
  31. 准备windows请勿关闭计算机要多久,windows10系统提示正在准备windows请勿关闭计算机怎么办...

    有不少windows10系统用户反映说碰到这样一个情况&#xff0c;就是电脑提示正在准备windows请勿关闭计算机&#xff0c;碰到这样的问题该怎么解决呢&#xff0c;现在小编就给大家分享一下windows10系统提示正在准备windows请勿关闭计算机的具体第一种方法&#xff1a;1、2、依次…...

    2022/11/19 21:17:11
  32. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”的解决方法...

    今天和大家分享一下win7系统重装了Win7旗舰版系统后&#xff0c;每次关机的时候桌面上都会显示一个“配置Windows Update的界面&#xff0c;提示请勿关闭计算机”&#xff0c;每次停留好几分钟才能正常关机&#xff0c;导致什么情况引起的呢&#xff1f;出现配置Windows Update…...

    2022/11/19 21:17:10
  33. 电脑桌面一直是清理请关闭计算机,windows7一直卡在清理 请勿关闭计算机-win7清理请勿关机,win7配置更新35%不动...

    只能是等着&#xff0c;别无他法。说是卡着如果你看硬盘灯应该在读写。如果从 Win 10 无法正常回滚&#xff0c;只能是考虑备份数据后重装系统了。解决来方案一&#xff1a;管理员运行cmd&#xff1a;net stop WuAuServcd %windir%ren SoftwareDistribution SDoldnet start WuA…...

    2022/11/19 21:17:09
  34. 计算机配置更新不起,电脑提示“配置Windows Update请勿关闭计算机”怎么办?

    原标题&#xff1a;电脑提示“配置Windows Update请勿关闭计算机”怎么办&#xff1f;win7系统中在开机与关闭的时候总是显示“配置windows update请勿关闭计算机”相信有不少朋友都曾遇到过一次两次还能忍但经常遇到就叫人感到心烦了遇到这种问题怎么办呢&#xff1f;一般的方…...

    2022/11/19 21:17:08
  35. 计算机正在配置无法关机,关机提示 windows7 正在配置windows 请勿关闭计算机 ,然后等了一晚上也没有关掉。现在电脑无法正常关机...

    关机提示 windows7 正在配置windows 请勿关闭计算机 &#xff0c;然后等了一晚上也没有关掉。现在电脑无法正常关机以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;关机提示 windows7 正在配…...

    2022/11/19 21:17:05
  36. 钉钉提示请勿通过开发者调试模式_钉钉请勿通过开发者调试模式是真的吗好不好用...

    钉钉请勿通过开发者调试模式是真的吗好不好用 更新时间:2020-04-20 22:24:19 浏览次数:729次 区域: 南阳 > 卧龙 列举网提醒您:为保障您的权益,请不要提前支付任何费用! 虚拟位置外设器!!轨迹模拟&虚拟位置外设神器 专业用于:钉钉,外勤365,红圈通,企业微信和…...

    2022/11/19 21:17:05
  37. 配置失败还原请勿关闭计算机怎么办,win7系统出现“配置windows update失败 还原更改 请勿关闭计算机”,长时间没反应,无法进入系统的解决方案...

    前几天班里有位学生电脑(windows 7系统)出问题了&#xff0c;具体表现是开机时一直停留在“配置windows update失败 还原更改 请勿关闭计算机”这个界面&#xff0c;长时间没反应&#xff0c;无法进入系统。这个问题原来帮其他同学也解决过&#xff0c;网上搜了不少资料&#x…...

    2022/11/19 21:17:04
  38. 一个电脑无法关闭计算机你应该怎么办,电脑显示“清理请勿关闭计算机”怎么办?...

    本文为你提供了3个有效解决电脑显示“清理请勿关闭计算机”问题的方法&#xff0c;并在最后教给你1种保护系统安全的好方法&#xff0c;一起来看看&#xff01;电脑出现“清理请勿关闭计算机”在Windows 7(SP1)和Windows Server 2008 R2 SP1中&#xff0c;添加了1个新功能在“磁…...

    2022/11/19 21:17:03
  39. 请勿关闭计算机还原更改要多久,电脑显示:配置windows更新失败,正在还原更改,请勿关闭计算机怎么办...

    许多用户在长期不使用电脑的时候&#xff0c;开启电脑发现电脑显示&#xff1a;配置windows更新失败&#xff0c;正在还原更改&#xff0c;请勿关闭计算机。。.这要怎么办呢&#xff1f;下面小编就带着大家一起看看吧&#xff01;如果能够正常进入系统&#xff0c;建议您暂时移…...

    2022/11/19 21:17:02
  40. 还原更改请勿关闭计算机 要多久,配置windows update失败 还原更改 请勿关闭计算机,电脑开机后一直显示以...

    配置windows update失败 还原更改 请勿关闭计算机&#xff0c;电脑开机后一直显示以以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;配置windows update失败 还原更改 请勿关闭计算机&#x…...

    2022/11/19 21:17:01
  41. 电脑配置中请勿关闭计算机怎么办,准备配置windows请勿关闭计算机一直显示怎么办【图解】...

    不知道大家有没有遇到过这样的一个问题&#xff0c;就是我们的win7系统在关机的时候&#xff0c;总是喜欢显示“准备配置windows&#xff0c;请勿关机”这样的一个页面&#xff0c;没有什么大碍&#xff0c;但是如果一直等着的话就要两个小时甚至更久都关不了机&#xff0c;非常…...

    2022/11/19 21:17:00
  42. 正在准备配置请勿关闭计算机,正在准备配置windows请勿关闭计算机时间长了解决教程...

    当电脑出现正在准备配置windows请勿关闭计算机时&#xff0c;一般是您正对windows进行升级&#xff0c;但是这个要是长时间没有反应&#xff0c;我们不能再傻等下去了。可能是电脑出了别的问题了&#xff0c;来看看教程的说法。正在准备配置windows请勿关闭计算机时间长了方法一…...

    2022/11/19 21:16:59
  43. 配置失败还原请勿关闭计算机,配置Windows Update失败,还原更改请勿关闭计算机...

    我们使用电脑的过程中有时会遇到这种情况&#xff0c;当我们打开电脑之后&#xff0c;发现一直停留在一个界面&#xff1a;“配置Windows Update失败&#xff0c;还原更改请勿关闭计算机”&#xff0c;等了许久还是无法进入系统。如果我们遇到此类问题应该如何解决呢&#xff0…...

    2022/11/19 21:16:58
  44. 如何在iPhone上关闭“请勿打扰”

    Apple’s “Do Not Disturb While Driving” is a potentially lifesaving iPhone feature, but it doesn’t always turn on automatically at the appropriate time. For example, you might be a passenger in a moving car, but your iPhone may think you’re the one dri…...

    2022/11/19 21:16:57