49 Commitit 1d4aef50a7 ... def8e40432

Tekijä SHA1 Viesti Päivämäärä
  limingming def8e40432 后台 查询用户位置信息优化 1 vuosi sitten
  limingming a1615b80c6 列表分页优化 1 vuosi sitten
  limingming 02b74828b5 上传图片优化 1 vuosi sitten
  limingming 55b99bca56 用户地址信息字段变更为经纬度 1 vuosi sitten
  limingming 04e4cc9975 优化 1 vuosi sitten
  limingming 866d3d762e Api 添加获取ip工具类 1 vuosi sitten
  limingming 976df5796b Api 添加上传用户地址信息接口 1 vuosi sitten
  limingming 84e6cc3744 Api短信验证码逻辑偶优化 1 vuosi sitten
  limingming a358de8065 Api 登录接口 1 vuosi sitten
  limingming ecc76a3839 Api 新增发送短信验证码接口 1 vuosi sitten
  limingming 63f0a41203 后台 优化返回组件全部信息(allList)接口 1 vuosi sitten
  limingming d0027619f4 后台 添加用户表和用户地址表,以及用户地址查询接口 1 vuosi sitten
  limingming d04f97683f 后台基础库 引导码,同步码,地址码,数据反码添加状态字段 1 vuosi sitten
  limingming 8d8505ea61 后台基础库 添加地址码字段 1 vuosi sitten
  limingming 3fb3a65ea4 后台模板库 新增图标字段 1 vuosi sitten
  limingming bde993813b api 提供h5查询所有已启用的模板列表 1 vuosi sitten
  limingming f4ae141122 后台基础库 基础库参数校验全部去掉 1 vuosi sitten
  limingming 59280bb43b 后台基础库 添加字段重复码 1 vuosi sitten
  limingming fcea34e39a 后台基础库 数据码字段参数校验,同步码字段非必填 1 vuosi sitten
  limingming cd0f23e156 后台基础库添加同步码 数据码字段数据码去除校验 1 vuosi sitten
  limingming 92178c8428 后台基础库添加同步码 数据码二进制 等字段 1 vuosi sitten
  limingming c8e9e71e0b h5接口返回数据添加模板背景图片 1 vuosi sitten
  limingming 488ccf6e54 删除无用代码 1 vuosi sitten
  limingming a62f86b9b4 Merge remote-tracking branch 'origin/dev-api' into dev-api 1 vuosi sitten
  limingming ca875e466f 优化上传接口,模板添加字段 1 vuosi sitten
  wangtianteng 04c3431471 上传图片 1 vuosi sitten
  limingming 498a3fbca6 后台图片上传 1 vuosi sitten
  limingming 3815e9782d api跳过权限 1 vuosi sitten
  limingming b2219c61f1 Api 新增app配置接口 1 vuosi sitten
  limingming e8ef0090ef Api h5接口优化 1 vuosi sitten
  limingming 7dfe7693fa Api模块修改配置文件 1 vuosi sitten
  limingming dba251fef0 修改配置文件 1 vuosi sitten
  limingming f47404443a 后台对接前端组件逻辑优化,优化删除接口1 1 vuosi sitten
  limingming 0fc6440306 后台对接前端组件逻辑优化,优化删除接口 1 vuosi sitten
  wangtianteng 6849c2075f 配置文件修改 1 vuosi sitten
  limingming 50cb40d14a 对接前端优化 1 vuosi sitten
  limingming 79fd47d677 暂时跳过后台权限验证 1 vuosi sitten
  limingming 26c4bbce67 添加mybatis-plus分页插件相关配置 1 vuosi sitten
  limingming 58f7919445 Merge remote-tracking branch 'origin/dev-api' into dev-api 1 vuosi sitten
  limingming ff040a1c87 安卓demo接口1 1 vuosi sitten
  limingming 40eed63472 安卓demo接口 1 vuosi sitten
  wangtianteng 8eacbf56b3 maven修改-2 1 vuosi sitten
  wangtianteng 934c02469c maven修改 1 vuosi sitten
  wangtianteng e5bfbaa6da Merge remote-tracking branch 'origin/dev-api' into dev-api 1 vuosi sitten
  hanwenjie 158d8a3a0b Merge remote-tracking branch 'origin/master' into dev-api 1 vuosi sitten
  wangtianteng 94659e1e34 测试测试 1 vuosi sitten
  limingming 05b458d7fb fix 1 vuosi sitten
  limingming 4230e8f985 返回类型及分页设置 1 vuosi sitten
  limingming d5f797fe76 根据库生成相关代码 1 vuosi sitten
74 muutettua tiedostoa jossa 2694 lisäystä ja 106 poistoa
  1. 1 0
      rouyi-api/pom.xml
  2. 41 0
      rouyi-api/src/main/java/com/info666/infraredRemote/config/SMSProperties.java
  3. 34 0
      rouyi-api/src/main/java/com/info666/infraredRemote/controller/AppConfigController.java
  4. 74 0
      rouyi-api/src/main/java/com/info666/infraredRemote/controller/GetDeviceInfoController.java
  5. 105 0
      rouyi-api/src/main/java/com/info666/infraredRemote/controller/SmsController.java
  6. 76 0
      rouyi-api/src/main/java/com/info666/infraredRemote/controller/UserLoginController.java
  7. 37 7
      rouyi-api/src/main/resources/application.yml
  8. 25 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/AppConfigController.java
  9. 140 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/BasicLibraryController.java
  10. 111 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/ComponentsLibraryController.java
  11. 86 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/QrLibraryController.java
  12. 86 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/TemplateLibraryController.java
  13. 46 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/UploadController.java
  14. 54 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/UserInfoController.java
  15. 30 8
      ruoyi-admin/src/main/resources/application.yml
  16. 13 0
      ruoyi-common/pom.xml
  17. 1 1
      ruoyi-common/src/main/java/com/ruoyi/common/annotation/Anonymous.java
  18. 47 2
      ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java
  19. 20 0
      ruoyi-common/src/main/java/com/ruoyi/common/core/config/MybatisPlusConfig.java
  20. 1 1
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java
  21. 23 0
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseOrderInfo.java
  22. 40 0
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BasePageInfo.java
  23. 53 0
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/CodeMsg.java
  24. 9 0
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/ErrorEnum.java
  25. 40 0
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/PageInfo.java
  26. 67 53
      ruoyi-common/src/main/java/com/ruoyi/common/core/domain/R.java
  27. 56 0
      ruoyi-common/src/main/java/com/ruoyi/common/core/ip/IPUtils.java
  28. 14 6
      ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java
  29. 75 0
      ruoyi-common/src/main/java/com/ruoyi/common/core/sms/SendMessage.java
  30. 15 0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/ConstantUtil.java
  31. 1 1
      ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java
  32. 16 24
      ruoyi-framework/src/main/java/com/ruoyi/framework/config/MyBatisConfig.java
  33. 2 0
      ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
  34. 29 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/AppConfigLibrary.java
  35. 21 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseParam.java
  36. 112 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/BasicLibrary.java
  37. 84 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/ComponentsLibrary.java
  38. 57 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/QrLibrary.java
  39. 66 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/TemplateLibrary.java
  40. 24 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/UploadInfo.java
  41. 55 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/UserAddress.java
  42. 57 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/UserInfo.java
  43. 92 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/ComponentsAndBasicVo.java
  44. 38 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/GetDeviceInfoVo.java
  45. 19 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SmsResponseVo.java
  46. 15 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/AppConfigLibraryMapper.java
  47. 15 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/BasicLibraryMapper.java
  48. 15 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/ComponentsLibraryMapper.java
  49. 15 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/QrLibraryMapper.java
  50. 14 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/TemplateLibraryMapper.java
  51. 16 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserAddressMapper.java
  52. 14 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserInfoMapper.java
  53. 16 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/AppConfigLibraryService.java
  54. 16 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/BasicLibraryService.java
  55. 23 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/ComponentsLibraryService.java
  56. 15 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/QrLibraryService.java
  57. 14 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/TemplateLibraryService.java
  58. 19 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/UserAddressService.java
  59. 14 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/UserInfoService.java
  60. 20 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AppConfigLibraryServiceImpl.java
  61. 20 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BasicLibraryServiceImpl.java
  62. 66 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ComponentsLibraryServiceImpl.java
  63. 19 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/QrLibraryServiceImpl.java
  64. 10 3
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java
  65. 18 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TemplateLibraryServiceImpl.java
  66. 25 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserAddressServiceImpl.java
  67. 18 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserInfoServiceImpl.java
  68. 18 0
      ruoyi-system/src/main/resources/mapper/system/platform/AppConfigLibraryMapper.xml
  69. 29 0
      ruoyi-system/src/main/resources/mapper/system/platform/BasicLibraryMapper.xml
  70. 30 0
      ruoyi-system/src/main/resources/mapper/system/platform/ComponentsLibraryMapper.xml
  71. 26 0
      ruoyi-system/src/main/resources/mapper/system/platform/QrLibraryMapper.xml
  72. 26 0
      ruoyi-system/src/main/resources/mapper/system/platform/TemplateLibraryMapper.xml
  73. 33 0
      ruoyi-system/src/main/resources/mapper/system/platform/UserAddressMapper.xml
  74. 22 0
      ruoyi-system/src/main/resources/mapper/system/platform/UserInfoMapper.xml

+ 1 - 0
rouyi-api/pom.xml

@@ -42,6 +42,7 @@
             <artifactId>ruoyi-framework</artifactId>
         </dependency>
 
+
     </dependencies>
 
     <build>

+ 41 - 0
rouyi-api/src/main/java/com/info666/infraredRemote/config/SMSProperties.java

@@ -0,0 +1,41 @@
+package com.info666.infraredRemote.config;
+
+import lombok.Data;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author liming
+ * @date 2023/08/02
+ */
+@Data
+@Component
+public class SMSProperties {
+
+    /**
+     * accessKeyId
+     */
+    @Value("${aliyun.sms.accessKeyId}")
+    private String accessKeyId;
+
+    /**
+     * accessKeySecret
+     */
+    @Value("${aliyun.sms.accessKeySecret}")
+    private String accessKeySecret;
+
+    /**
+     * 短信签名
+     */
+    @Value("${aliyun.sms.signName}")
+    private String signName;
+
+    /**
+     * 短信模板
+     */
+    @Value("${aliyun.sms.templateCode}")
+    private String templateCode;
+
+
+
+}

+ 34 - 0
rouyi-api/src/main/java/com/info666/infraredRemote/controller/AppConfigController.java

@@ -0,0 +1,34 @@
+package com.info666.infraredRemote.controller;
+
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.system.domain.AppConfigLibrary;
+import com.ruoyi.system.service.AppConfigLibraryService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @Author: LiMingMing
+ * @Date: 2023/7/19 14:27
+ * @Description: TODO
+ **/
+@RestController
+@RequestMapping("/api/v1/appConfig")
+public class AppConfigController {
+
+    @Autowired
+    private AppConfigLibraryService appConfigLibraryService;
+
+
+    @ApiOperation("获取App配置信息")
+    @GetMapping("/getAppConfig")
+    public R<List<AppConfigLibrary>> getAppConfig() {
+
+        return R.ok(appConfigLibraryService.list(null));
+    }
+
+}

+ 74 - 0
rouyi-api/src/main/java/com/info666/infraredRemote/controller/GetDeviceInfoController.java

@@ -0,0 +1,74 @@
+package com.info666.infraredRemote.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.system.domain.BaseParam;
+import com.ruoyi.system.domain.BasicLibrary;
+import com.ruoyi.system.domain.TemplateLibrary;
+import com.ruoyi.system.domain.vo.GetDeviceInfoVo;
+import com.ruoyi.system.service.BasicLibraryService;
+import com.ruoyi.system.service.TemplateLibraryService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Author: LiMingMing
+ * @Date: 2023/7/13 15:31
+ **/
+@RestController
+@RequestMapping("/api/v1/getInfo")
+public class GetDeviceInfoController {
+
+    @Autowired
+    private BasicLibraryService basicLibraryService;
+
+    @Autowired
+    private TemplateLibraryService templateLibraryService;
+
+    @ApiOperation("获取遥控设备信息")
+    @PostMapping("/getDeviceInfo")
+    public R<List<GetDeviceInfoVo>> getDeviceInfo(@RequestBody BaseParam param) {
+        Long temId = null;
+        if (param.getId() == null) {
+            temId = 1L;
+        } else {
+            temId = param.getId();
+        }
+
+        List<GetDeviceInfoVo> list = new ArrayList<>();
+        TemplateLibrary templateLibrary = templateLibraryService.getOne(new LambdaQueryWrapper<TemplateLibrary>().eq(TemplateLibrary::getId, temId), false);
+        //获取基本数据
+        BasicLibrary basicLibrary = basicLibraryService.getOne(new LambdaQueryWrapper<BasicLibrary>().eq(BasicLibrary::getDelFlag, 0)
+                .eq(BasicLibrary::getId, templateLibrary.getBaseId()), false);
+
+        GetDeviceInfoVo deviceInfoVo = new GetDeviceInfoVo();
+        deviceInfoVo.setBandValue(basicLibrary.getBandValue());
+        deviceInfoVo.setComponentsString(templateLibrary.getComponents());
+        deviceInfoVo.setBasicLibrary(basicLibrary);
+        deviceInfoVo.setBackgroundPictureUrl(templateLibrary.getBackgroundPictureUrl());
+        // TODO: 2023/7/17  需要跟h5再对一下    之前是list 现在只返回一条,不需要list
+        list.add(deviceInfoVo);
+        return R.ok(list);
+    }
+
+
+    /**
+     * 查询已启的模板库列表
+     */
+    @PostMapping("/getEnableTemplateList")
+    public R<List<TemplateLibrary>> getEnableTemplateList() {
+        List<TemplateLibrary> templateIPage = templateLibraryService.list(new LambdaQueryWrapper<TemplateLibrary>()
+                .eq(TemplateLibrary::getStatus, 0)
+                .eq(TemplateLibrary::getDelFlag, 0));
+        return R.ok(templateIPage);
+    }
+
+
+}

+ 105 - 0
rouyi-api/src/main/java/com/info666/infraredRemote/controller/SmsController.java

@@ -0,0 +1,105 @@
+package com.info666.infraredRemote.controller;
+
+import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.core.ip.IPUtils;
+import com.ruoyi.common.core.redis.RedisCache;
+import com.ruoyi.common.core.sms.SendMessage;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.system.domain.UserInfo;
+import com.ruoyi.system.domain.vo.SmsResponseVo;
+import org.apache.commons.lang3.RandomStringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletRequest;
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
+import java.util.UUID;
+import java.util.concurrent.TimeUnit;
+import java.util.regex.Pattern;
+
+@RestController
+@RequestMapping("/api/v1/sms")
+public class SmsController {
+
+    @Autowired
+    private RedisCache redisCache;
+    @Autowired
+    private RedisTemplate redisTemplate;
+
+
+    @PostMapping("/send")
+    public R<SmsResponseVo> sendSms(@RequestBody UserInfo param, HttpServletRequest request) {
+        if (StringUtils.isEmpty(param.getUserPhone()) || Pattern.matches("^1[3-9]\\d{9}$\n",param.getUserPhone())){
+            return R.fail("手机号格式不正确");
+        }
+
+        //每个公网id地址1天只能发100条
+        //每个手机号一天只能发10条,一分钟只能发一条
+        String ip = IPUtils.getIpAddr(request);
+        DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyyMMdd");
+        String strDate = dtf.format(LocalDate.now());
+        String ipKey = strDate + "_" + ip;
+        String phoneIconKey = strDate + "_"+"icon" + param.getUserPhone();
+        String phone = "phone_"+param.getUserPhone();
+        //一分钟发送一次
+        if (redisTemplate.hasKey(phone)) {
+            //存在
+            return R.fail("1分钟内只能发送一次,请稍后再试!");
+        } else {
+            //不存在
+            redisTemplate.opsForValue().set(phone, 1, 1L, TimeUnit.MINUTES);
+        }
+
+        //手机号
+        if (redisTemplate.hasKey(phoneIconKey)) {
+            //存在
+            Long increment = redisTemplate.opsForValue().increment(phoneIconKey, 1);
+            if (increment > 10) {
+                return R.fail("该手机号发送次数过多,已禁止发送!");
+            }
+        } else {
+            //不存在
+            redisTemplate.opsForValue().set(phoneIconKey, 1, 1L, TimeUnit.DAYS);
+        }
+
+        //ip
+        if (redisTemplate.hasKey(ipKey)) {
+            //存在
+            Long increment = redisTemplate.opsForValue().increment(ipKey, 1);
+            if (increment > 100) {
+                return R.fail("发送次数过多,已禁止发送!");
+            }
+        } else {
+            //不存在
+            redisTemplate.opsForValue().set(ipKey, 1, 1L, TimeUnit.DAYS);
+        }
+
+        // 通过RandomStringUtils生成随机验证码
+        String code = RandomStringUtils.randomNumeric(6);
+        SmsResponseVo smsResponse = new SmsResponseVo();
+        try {
+            //手机号和验证码进行发短信
+            SendSmsResponse sendSmsResponse = SendMessage.sendSms(param.getUserPhone(), code);
+
+            if (sendSmsResponse.getMessage().equals("OK")) {
+                String uuid = UUID.randomUUID().toString().replaceAll("-", "");
+                redisCache.setCacheObject(uuid, code, 5, TimeUnit.MINUTES);
+                smsResponse.setCode(sendSmsResponse.getCode());
+                smsResponse.setMessage(sendSmsResponse.getMessage());
+                smsResponse.setKeyCode(uuid);
+
+            }else {
+                return R.fail(sendSmsResponse.getMessage());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return R.ok(smsResponse);
+    }
+}

+ 76 - 0
rouyi-api/src/main/java/com/info666/infraredRemote/controller/UserLoginController.java

@@ -0,0 +1,76 @@
+package com.info666.infraredRemote.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.core.redis.RedisCache;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.system.domain.UserAddress;
+import com.ruoyi.system.domain.UserInfo;
+import com.ruoyi.system.domain.vo.SmsResponseVo;
+import com.ruoyi.system.service.UserAddressService;
+import com.ruoyi.system.service.UserInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.regex.Pattern;
+
+/**
+ * @Author: LiMingMing
+ * @Date: 2023/8/1 16:09
+ * @Description: TODO
+ **/
+@RestController
+@RequestMapping("/api/v1/user")
+public class UserLoginController {
+
+    @Autowired
+    private UserInfoService userInfoService;
+
+    @Autowired
+    private UserAddressService userAddressService;
+
+    @Autowired
+    private RedisCache redisCache;
+
+    /**
+     * 登录接口
+     */
+    @PostMapping("/login")
+    public R<SmsResponseVo> sendSms(@RequestBody UserInfo param) {
+        if (StringUtils.isEmpty(param.getUserPhone()) || Pattern.matches("^1[3-9]\\d{9}$\n",param.getUserPhone())){
+            return R.fail("手机号格式不正确");
+        }
+        if (StringUtils.isEmpty(param.getCode())){
+            return R.fail("验证不能为空");
+        }
+        UserInfo userInfo = userInfoService.getOne(new LambdaQueryWrapper<UserInfo>().eq(UserInfo::getUserPhone,param.getUserPhone()),false);
+        if (userInfo == null){
+            param.setCreateTime(DateUtils.getNowDate());
+            userInfoService.save(param);
+        }
+        if (!redisCache.getCacheObject(param.getKeyCode()).equals(param.getCode())){
+            return R.fail("验证码错误");
+        }
+        return R.ok();
+    }
+
+    /**
+     * 上传用户地址
+     */
+    @PostMapping("/uploadAddress")
+    public R<SmsResponseVo> sendSms(@RequestBody UserAddress param) {
+        UserInfo one = userInfoService.getOne(new LambdaQueryWrapper<UserInfo>().eq(UserInfo::getUserPhone, param.getUserPhone()),false);
+        param.setUserId(one.getId());
+        param.setCreateTime(DateUtils.getNowDate());
+        userAddressService.save(param);
+        return R.ok();
+    }
+
+
+
+
+}

+ 37 - 7
rouyi-api/src/main/resources/application.yml

@@ -9,7 +9,7 @@ ruoyi:
   # 实例演示开关
   demoEnabled: true
   # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
-  profile: D:/ruoyi/uploadPath
+  profile: /home/ruoyi/uploadPath
   # 获取ip地址开关
   addressEnabled: false
   # 验证码类型 math 数字计算 char 字符验证
@@ -99,14 +99,33 @@ token:
   # 令牌有效期(默认30分钟)
   expireTime: 30
 
-# MyBatis配置
-mybatis:
-  # 搜索指定包别名
+## MyBatis配置
+#mybatis:
+#  # 搜索指定包别名
+#  typeAliasesPackage: com.ruoyi.**.domain
+#  # 配置mapper的扫描,找到所有的mapper.xml映射文件
+#  mapperLocations: classpath*:mapper/**/*Mapper.xml
+#  # 加载全局的配置文件
+#  configLocation: classpath:mybatis/mybatis-config.xml
+
+# MyBatis-plus配置
+mybatis-plus:
+  # 指定实体类所在包的路径,MyBatis-Plus 会自动扫描该路径下的实体类
   typeAliasesPackage: com.ruoyi.**.domain
-  # 配置mapper的扫描,找到所有的mapper.xml映射文件
+  # 指定 Mapper 接口所在包的路径,MyBatis-Plus 会自动扫描该路径下的 Mapper 接口
   mapperLocations: classpath*:mapper/**/*Mapper.xml
-  # 加载全局的配置文件
-  configLocation: classpath:mybatis/mybatis-config.xml
+  # 指定 MyBatis 全局配置文件的位置
+  #  configLocation: classpath:mybatis/mybatis-config.xml
+  configuration:
+    #在映射实体或者属性时,将数据库中表名和字段名中的下划线去掉,按照驼峰命名法映射
+    map-underscore-to-camel-case: true
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  global-config:
+    db-config:
+      id-type: AUTO
+      logic-delete-field: delFlag #删除字段
+      logic-delete-value: 2
+      logic-not-delete-value: 0
 
 # PageHelper分页插件
 pagehelper:
@@ -129,3 +148,14 @@ xss:
   excludes: /system/notice
   # 匹配链接
   urlPatterns: /system/*,/monitor/*,/tool/*
+
+#自定义短信模板配置
+aliyun:
+  sms:
+    accessKeyId: LTAI5tKvxXUQ61e5PSm3mzQ1
+    accessKeySecret: WEzhPLHWqEINBbiLn168g2nP1H8Cje
+    #短信签名
+    signName: 阿里云短信测试
+    #短信模板
+    templateCode: SMS_154950909
+

+ 25 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/AppConfigController.java

@@ -0,0 +1,25 @@
+package com.ruoyi.web.controller.platform;
+
+import com.ruoyi.system.service.AppConfigLibraryService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @Author: LiMingMing
+ * @Date: 2023/7/19 14:27
+ * @Description: app版本更新 配置更新内容
+ **/
+@RestController
+@RequestMapping("/platform/v1/appConfig")
+public class AppConfigController {
+
+    @Autowired
+    private AppConfigLibraryService appConfigLibraryService;
+
+    //CRUD  四个接口
+
+
+
+
+}

+ 140 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/BasicLibraryController.java

@@ -0,0 +1,140 @@
+package com.ruoyi.web.controller.platform;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.BaseParam;
+import com.ruoyi.system.domain.BasicLibrary;
+import com.ruoyi.system.service.BasicLibraryService;
+import io.swagger.annotations.ApiOperation;
+import org.apache.poi.ss.formula.functions.T;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 基础库管理Controller
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+@RestController
+@RequestMapping("/platform/v1/base")
+public class BasicLibraryController extends BaseController {
+    @Autowired
+    private BasicLibraryService basicLibraryService;
+
+    /**
+     * 查询基础库列表
+     */
+    @ApiOperation("查询基础库管理列表")
+//    @PreAuthorize("@ss.hasPermi('platform:base:list')")
+    @PostMapping("/list")
+    public R<IPage<BasicLibrary>> list(@RequestBody BaseParam param) {
+        IPage<BasicLibrary> basicLibraryIPage = basicLibraryService.page(new Page<BasicLibrary>().setCurrent(param.getCurrent()).setSize(param.getSize()),
+                new LambdaQueryWrapper<BasicLibrary>().like(param.getName()!=null,BasicLibrary::getName,param.getName())
+                        .eq(BasicLibrary::getDelFlag,0));
+        return R.ok(basicLibraryIPage);
+    }
+
+
+    /**
+     * 查询基础库列表
+     */
+    @ApiOperation("查询基础库管理列表")
+//    @PreAuthorize("@ss.hasPermi('platform:base:list')")
+    @PostMapping("/allList")
+    public R<List<BasicLibrary>> getAllList() {
+        List<BasicLibrary> basicLibraryList = basicLibraryService.list(new LambdaQueryWrapper<BasicLibrary>().eq(BasicLibrary::getDelFlag,0));
+        return R.ok(basicLibraryList);
+    }
+
+    
+    /**
+     * 获取基础库详细信息
+     */
+//    @PreAuthorize("@ss.hasPermi('platform:base:query')")
+    @PostMapping(value = "/getInfo")
+    public R<BasicLibrary> getInfo(@RequestBody BaseParam param){
+
+        return R.ok( basicLibraryService.getOne(new LambdaQueryWrapper<BasicLibrary>().eq(BasicLibrary::getId, param.getId())
+                .eq(BasicLibrary::getDelFlag, "0"), false));
+    }
+
+    /**
+     * 新增修改基础库
+     */
+//    @PreAuthorize("@ss.hasPermi('platform:base:add')")
+    @Log(title = "基础库管理", businessType = BusinessType.INSERT)
+    @PostMapping("addOrUpdate")
+    public R<Boolean> add(@RequestBody BasicLibrary param) {
+        //参数校验
+//        String[] bootCode = param.getBootCode().split(",");
+//        if (bootCode.length != 2){
+//            return R.fail("引导码参数格式有误");
+//        }
+//        if (param.getBootCodeSend() < 0){
+//            return R.fail("引导码发送次数参数有误");
+//        }
+//        String[] synchronizeCode = param.getSynchronizeCode().split(",");
+//        if (synchronizeCode.length != 2){
+//            return R.fail("同步码参数格式有误");
+//        }
+//        if (param.getSynchronizeCodeSend() < 0){
+//            return R.fail("同步码发送次数参数有误");
+//        }
+
+//        String[] dateCode = param.getDateCode().split(",");
+//        if (dateCode.length % 2 != 0){
+//            return R.fail("数据码参数有误");
+//        }
+//        if (StringUtils.isEmpty(param.getDateCode())){
+//            return R.fail("数据码参数不能为空");
+//        }
+//
+//        String[] dateBinary0 = param.getDateBinary0().split(",");
+//        if (dateBinary0.length != 2){
+//            return R.fail("数据码二进制0参数格式有误");
+//        }
+//        String[] dateBinary1 = param.getDateBinary1().split(",");
+//        if (dateBinary1.length != 2){
+//            return R.fail("数据码二进制1参数格式有误");
+//        }
+//
+//        String[] overCode = param.getOverCode().split(",");
+//        if (overCode.length != 2){
+//            return R.fail("结束码参数有误");
+//        }
+        if (param.getId() != null) {
+            param.setUpdateTime(DateUtils.getNowDate());
+        }else {
+            param.setCreateTime(DateUtils.getNowDate());
+        }
+        return R.ok(basicLibraryService.saveOrUpdate(param));
+    }
+
+
+    /**
+     * 删除红外遥控基础库
+     */
+//    @PreAuthorize("@ss.hasPermi('platform:base:remove')")
+    @Log(title = "基础库管理", businessType = BusinessType.DELETE)
+	@PostMapping("/delete")
+    public R<T> remove(@RequestBody BaseParam param) {
+        boolean flat = basicLibraryService.removeById(param.getId());
+        if (!flat){
+            return R.fail("删除失败");
+        }
+        return R.ok();
+    }
+}

+ 111 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/ComponentsLibraryController.java

@@ -0,0 +1,111 @@
+package com.ruoyi.web.controller.platform;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.PageInfo;
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.BaseParam;
+import com.ruoyi.system.domain.ComponentsLibrary;
+import com.ruoyi.system.domain.vo.ComponentsAndBasicVo;
+import com.ruoyi.system.service.BasicLibraryService;
+import com.ruoyi.system.service.ComponentsLibraryService;
+import io.swagger.annotations.ApiOperation;
+import org.apache.poi.ss.formula.functions.T;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 组件库Controller
+ *
+ * @author liming
+ * @date 2023-07-12
+ */
+@RestController
+@RequestMapping("/platform/v1/components")
+public class ComponentsLibraryController extends BaseController {
+    @Autowired
+    private ComponentsLibraryService componentsLibraryService;
+
+    @Autowired
+    private BasicLibraryService basicLibraryService;
+
+    /**
+     * 查询组件库列表
+     */
+//    @PreAuthorize("@ss.hasPermi('platform:components:list')")
+    @PostMapping("/list")
+    public R<IPage<ComponentsLibrary>> list(@RequestBody BaseParam param) {
+        IPage<ComponentsLibrary> basicLibraryIPage = componentsLibraryService.page(new Page<ComponentsLibrary>().setCurrent(param.getCurrent()).setSize(param.getSize()),
+                new LambdaQueryWrapper<ComponentsLibrary>().like(param.getName()!=null,ComponentsLibrary::getName,param.getName())
+                        .eq(ComponentsLibrary::getDelFlag,"0"));
+        PageInfo<ComponentsLibrary> pageInfo = new PageInfo<>();
+        pageInfo.setRecords(basicLibraryIPage.getRecords());
+        pageInfo.setSize(param.getSize());
+        pageInfo.setCurrent(basicLibraryIPage.getCurrent());
+        pageInfo.setTotal(basicLibraryIPage.getTotal());
+        return R.ok(basicLibraryIPage);
+    }
+
+
+    /**
+     * 查询组件全部信息 包括
+     */
+    @ApiOperation("查询组件库管理列表")
+//    @PreAuthorize("@ss.hasPermi('platform:base:list')")
+    @PostMapping("/allList")
+    public R<List<ComponentsAndBasicVo>> getAllList() {
+        List<ComponentsAndBasicVo> list = componentsLibraryService.getAllComponentsInfo();
+        return R.ok(list);
+    }
+
+
+    /**
+     * 获取组件库详细信息
+     */
+//    @PreAuthorize("@ss.hasPermi('platform:components:query')")
+    @PostMapping(value = "/getInfo")
+    public R<ComponentsLibrary> getInfo(@RequestBody BaseParam param) {
+        return R.ok(componentsLibraryService.getOne(new LambdaQueryWrapper<ComponentsLibrary>().eq(ComponentsLibrary::getId,param.getId())
+                .eq(ComponentsLibrary::getDelFlag,"0"),false));
+    }
+
+    /**
+     * 新增修改组件库
+     */
+//    @PreAuthorize("@ss.hasPermi('platform:components:add')")
+    @Log(title = "组件库", businessType = BusinessType.INSERT)
+    @PostMapping("addOrUpdate")
+    public R<Boolean> add(@RequestBody ComponentsLibrary param) {
+        if (param.getId() != null) {
+            param.setUpdateTime(DateUtils.getNowDate());
+        }else {
+            param.setCreateTime(DateUtils.getNowDate());
+        }
+        return R.ok(componentsLibraryService.saveOrUpdate(param));
+    }
+
+
+    /**
+     * 删除组件库
+     */
+//    @PreAuthorize("@ss.hasPermi('platform:components:remove')")
+    @Log(title = "组件库", businessType = BusinessType.DELETE)
+	@PostMapping("/delete")
+    public R<T> remove(@RequestBody BaseParam param) {
+        boolean flat = componentsLibraryService.removeById(param.getId());
+        if (!flat){
+            return R.fail("删除失败");
+        }
+        return R.ok();
+    }
+}

+ 86 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/QrLibraryController.java

@@ -0,0 +1,86 @@
+package com.ruoyi.web.controller.platform;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.BaseParam;
+import com.ruoyi.system.domain.QrLibrary;
+import com.ruoyi.system.service.QrLibraryService;
+import org.apache.poi.ss.formula.functions.T;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 二维码Controller
+ *
+ * @author liming
+ * @date 2023-07-12
+ */
+@RestController
+@RequestMapping("/platform/v1/qr")
+public class QrLibraryController extends BaseController {
+    @Autowired
+    private QrLibraryService qrLibraryService;
+
+    /**
+     * 查询二维码列表
+     */
+//    @PreAuthorize("@ss.hasPermi('platform:or:list')")
+    @PostMapping("/list")
+    public R<IPage<QrLibrary>> list(@RequestBody BaseParam param){
+        IPage<QrLibrary> qrLibraryIPage = qrLibraryService.page(new Page<QrLibrary>().setCurrent(param.getCurrent()).setSize(param.getSize()),
+                new LambdaQueryWrapper<QrLibrary>().like(param.getName()!=null,QrLibrary::getName,param.getName())
+                        .eq(QrLibrary::getDelFlag,0));
+        return R.ok(qrLibraryIPage);
+    }
+
+
+    /**
+     * 获取二维码详细信息
+     */
+//    @PreAuthorize("@ss.hasPermi('platform:or:query')")
+    @PostMapping(value = "/getInfo")
+    public R<QrLibrary> getInfo(@RequestBody BaseParam param) {
+        return R.ok(qrLibraryService.getOne(new LambdaQueryWrapper<QrLibrary>().eq(QrLibrary::getId,param.getId())
+                .eq(QrLibrary::getDelFlag,"0"),false));
+    }
+
+    /**
+     * 新增修改二维码
+     */
+//    @PreAuthorize("@ss.hasPermi('platform:or:add')")
+    @Log(title = "红外遥控二维码", businessType = BusinessType.INSERT)
+    @PostMapping("/addOrUpdate")
+    public R<Boolean> add(@RequestBody QrLibrary param) {
+        if (param.getId() != null) {
+            param.setUpdateTime(DateUtils.getNowDate());
+        }else {
+            param.setCreateTime(DateUtils.getNowDate());
+        }
+        return R.ok(qrLibraryService.saveOrUpdate(param));
+    }
+
+
+
+    /**
+     * 删除二维码
+     */
+//    @PreAuthorize("@ss.hasPermi('platform:or:remove')")
+    @Log(title = "红外遥控二维码", businessType = BusinessType.DELETE)
+	@PostMapping("/delete")
+    public R<T> remove(@RequestBody BaseParam param) {
+        boolean sta = qrLibraryService.removeById(param.getId());
+        if (!sta){
+            return R.fail("删除失败");
+        }
+        return R.ok();
+    }
+}

+ 86 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/TemplateLibraryController.java

@@ -0,0 +1,86 @@
+package com.ruoyi.web.controller.platform;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.system.domain.BaseParam;
+import com.ruoyi.system.domain.TemplateLibrary;
+import com.ruoyi.system.service.TemplateLibraryService;
+import org.apache.poi.ss.formula.functions.T;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 红外遥控模板库Controller
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+@RestController
+@RequestMapping("/platform/v1/template")
+public class TemplateLibraryController extends BaseController {
+    @Autowired
+    private TemplateLibraryService templateLibraryService;
+
+    /**
+     * 查询模板库列表
+     */
+//    @PreAuthorize("@ss.hasPermi('platform:template:list')")
+    @PostMapping("/list")
+    public R<IPage<TemplateLibrary>> list(@RequestBody BaseParam param) {
+        IPage<TemplateLibrary> templateIPage = templateLibraryService.page(new Page<TemplateLibrary>().setCurrent(param.getCurrent()).setSize(param.getSize()),
+                new LambdaQueryWrapper<TemplateLibrary>().like(param.getName()!=null,TemplateLibrary::getName,param.getName())
+                        .eq(TemplateLibrary::getDelFlag,0));
+        return R.ok(templateIPage);
+    }
+
+
+    /**
+     * 获取模板库详细信息
+     */
+//    @PreAuthorize("@ss.hasPermi('platform:template:query')")
+    @PostMapping(value = "/getInfo")
+    public R<TemplateLibrary> getInfo(@RequestBody BaseParam param) {
+
+        return R.ok(templateLibraryService.getOne(new LambdaQueryWrapper<TemplateLibrary>().eq(TemplateLibrary::getId,param.getId())
+                .eq(TemplateLibrary::getDelFlag,"0"),false));
+    }
+
+    /**
+     * 新增模板库
+     */
+//    @PreAuthorize("@ss.hasPermi('platform:template:add')")
+    @Log(title = "模板库", businessType = BusinessType.INSERT)
+    @PostMapping("addOrUpdate")
+    public R<Boolean> add(@RequestBody TemplateLibrary param) {
+        if (param.getId() != null) {
+            param.setUpdateTime(DateUtils.getNowDate());
+        }else {
+            param.setCreateTime(DateUtils.getNowDate());
+        }
+        return R.ok(templateLibraryService.saveOrUpdate(param));
+    }
+
+
+    /**
+     * 删除模板库
+     */
+//    @PreAuthorize("@ss.hasPermi('platform:template:remove')")
+    @Log(title = "模板库", businessType = BusinessType.DELETE)
+	@PostMapping("/delete")
+    public R<T> remove(@RequestBody BaseParam param) {
+        boolean salt = templateLibraryService.removeById(param.getId());
+        if (!salt){
+            return R.fail("删除失败");
+        }
+        return R.ok();
+    }
+}

+ 46 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/UploadController.java

@@ -0,0 +1,46 @@
+package com.ruoyi.web.controller.platform;
+
+import com.ruoyi.common.config.RuoYiConfig;
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.utils.ConstantUtil;
+import com.ruoyi.common.utils.file.FileUploadUtils;
+import com.ruoyi.system.domain.UploadInfo;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+
+/**
+ * @Author: LiMingMing
+ * @Date: 2023/7/20 16:24
+ * @Description: 上传文件图片
+ **/
+@RestController
+@RequestMapping("/platform/v1/upload")
+public class UploadController {
+
+    @ResponseBody
+    @PostMapping("/uploadImage")
+    public R<UploadInfo> addSave(@RequestParam("file") MultipartFile file) throws IOException {
+        String originalImgFilename = file.getOriginalFilename();
+        String imgSuffix = originalImgFilename.substring(file.getOriginalFilename().lastIndexOf("."));
+        if (!ConstantUtil.PICTURE.contains(imgSuffix)) {
+            return R.fail("图片类型格式不支持");
+        }
+        //不超过5M
+        if (file.getSize() / 1024  > 5120 ){
+            return R.fail("图片大小超过限制");
+        }
+        // 上传文件路径
+        String filePath = RuoYiConfig.getUploadPath();
+        // 上传并返回新文件名称
+        String fileNewName = FileUploadUtils.upload(filePath, file);
+        UploadInfo uploadInfo = new UploadInfo();
+        uploadInfo.setUrl(fileNewName);
+
+        //返回文件名 和存放路径
+        return R.ok(uploadInfo);
+    }
+
+
+}

+ 54 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/platform/UserInfoController.java

@@ -0,0 +1,54 @@
+package com.ruoyi.web.controller.platform;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.system.domain.BaseParam;
+import com.ruoyi.system.domain.UserAddress;
+import com.ruoyi.system.domain.UserInfo;
+import com.ruoyi.system.service.UserAddressService;
+import com.ruoyi.system.service.UserInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 用户信息Controller
+ * 
+ * @author liming
+ * @date 2023-08-01
+ */
+@RestController
+@RequestMapping("/platform/v1/userInfo")
+public class UserInfoController extends BaseController {
+    @Autowired
+    private UserInfoService userInfoService;
+
+    @Autowired
+    private UserAddressService userAddressService;
+
+    /**
+     * 查询用户信息列表
+     */
+//    @PreAuthorize("@ss.hasPermi('system:info:list')")
+    @PostMapping("/list")
+    public R<IPage<UserInfo>> list(@RequestBody  BaseParam param) {
+        IPage<UserInfo> userInfoIPage = userInfoService.page(new Page<UserInfo>().setCurrent(param.getCurrent()).setSize(param.getSize()),
+                new LambdaQueryWrapper<UserInfo>().eq(UserInfo::getDelFlag,0));
+        return R.ok(userInfoIPage);
+    }
+
+
+    /**
+     * 获取用户地址详情信息
+     */
+//    @PreAuthorize("@ss.hasPermi('system:info:query')")
+    @PostMapping(value = "/userAddress")
+    public R<UserAddress> getInfo(@RequestBody BaseParam param) {
+        UserAddress userAddress = userAddressService.getAddress(param.getId());
+        return R.ok(userAddress);
+    }
+
+
+}

+ 30 - 8
ruoyi-admin/src/main/resources/application.yml

@@ -3,13 +3,14 @@ ruoyi:
   # 名称
   name: RuoYi
   # 版本
-  version: 3.8.6
+  version: 1.0.0
   # 版权年份
   copyrightYear: 2023
   # 实例演示开关
   demoEnabled: true
   # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
-  profile: D:/ruoyi/uploadPath
+#  profile: /home/ruoyi/uploadPath
+  profile: C:/Users/L.M/Desktop/ruoyi/uploadPath
   # 获取ip地址开关
   addressEnabled: false
   # 验证码类型 math 数字计算 char 字符验证
@@ -99,14 +100,35 @@ token:
   # 令牌有效期(默认30分钟)
   expireTime: 30
 
-# MyBatis配置
-mybatis:
-  # 搜索指定包别名
+## MyBatis配置
+#mybatis:
+#  # 搜索指定包别名
+#  typeAliasesPackage: com.ruoyi.**.domain
+#  # 配置mapper的扫描,找到所有的mapper.xml映射文件
+#  mapperLocations: classpath*:mapper/**/*Mapper.xml
+#  # 加载全局的配置文件
+#  configLocation: classpath:mybatis/mybatis-config.xml
+
+
+# MyBatis-plus配置
+mybatis-plus:
+  # 指定实体类所在包的路径,MyBatis-Plus 会自动扫描该路径下的实体类
   typeAliasesPackage: com.ruoyi.**.domain
-  # 配置mapper的扫描,找到所有的mapper.xml映射文件
+  # 指定 Mapper 接口所在包的路径,MyBatis-Plus 会自动扫描该路径下的 Mapper 接口
   mapperLocations: classpath*:mapper/**/*Mapper.xml
-  # 加载全局的配置文件
-  configLocation: classpath:mybatis/mybatis-config.xml
+  # 指定 MyBatis 全局配置文件的位置
+  #  configLocation: classpath:mybatis/mybatis-config.xml
+  configuration:
+    #在映射实体或者属性时,将数据库中表名和字段名中的下划线去掉,按照驼峰命名法映射
+    map-underscore-to-camel-case: true
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  global-config:
+    db-config:
+      id-type: AUTO
+      logic-delete-field: delFlag #删除字段
+      logic-delete-value: 2
+      logic-not-delete-value: 0
+
 
 # PageHelper分页插件
 pagehelper:

+ 13 - 0
ruoyi-common/pom.xml

@@ -157,6 +157,19 @@
             </exclusions>
         </dependency>
 
+        <!--阿里云短信sdk-->
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-core</artifactId>
+            <version>4.4.1</version>
+        </dependency>
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-dysmsapi</artifactId>
+            <version>1.1.0</version>
+        </dependency>
+
+
     </dependencies>
 
 </project>

+ 1 - 1
ruoyi-common/src/main/java/com/ruoyi/common/annotation/Anonymous.java

@@ -7,7 +7,7 @@ import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
- * 匿名访问不鉴权注解
+ * 匿名访问不鉴权注解to
  * 
  * @author ruoyi
  */

+ 47 - 2
ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java

@@ -37,12 +37,22 @@ public class Constants
     /**
      * 通用成功标识
      */
-    public static final String SUCCESS = "0";
+    public static final String SUCCESS = "200";
 
     /**
      * 通用失败标识
      */
-    public static final String FAIL = "1";
+    public static final String FAIL = "444";
+
+    /**
+     * 登录成功状态
+     */
+    public static final String LOGIN_SUCCESS_STATUS = "0";
+
+    /**
+     * 登录失败状态
+     */
+    public static final String LOGIN_FAIL_STATUS = "1";
 
     /**
      * 登录成功
@@ -63,6 +73,26 @@ public class Constants
      * 登录失败
      */
     public static final String LOGIN_FAIL = "Error";
+
+    /**
+     * 当前记录起始索引
+     */
+    public static final String PAGE_NUM = "pageNum";
+
+    /**
+     * 每页显示记录数
+     */
+    public static final String PAGE_SIZE = "pageSize";
+
+    /**
+     * 排序列
+     */
+    public static final String ORDER_BY_COLUMN = "orderByColumn";
+
+    /**
+     * 排序的方向 "desc" 或者 "asc".
+     */
+    public static final String IS_ASC = "isAsc";
  
     /**
      * 验证码有效期(分钟)
@@ -115,6 +145,11 @@ public class Constants
     public static final String RESOURCE_PREFIX = "/profile";
 
     /**
+     * 资源映射路径 前缀
+     */
+    public static final String UPLOADPATH = "/uploadPath";
+
+    /**
      * RMI 远程方法调用
      */
     public static final String LOOKUP_RMI = "rmi:";
@@ -139,4 +174,14 @@ public class Constants
      */
     public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
             "org.springframework", "org.apache", "com.ruoyi.common.utils.file", "com.ruoyi.common.config" };
+
+
+    public static final boolean R_COM_SUCCESS = true;
+    public static final boolean R_COM_DEFAULT_ERROR = true;
+    public static final String R_COM_DEFAULT_CODE = "-1";
+    public static final String R_COM_DEFAULT_STATUS = "1";
+    public static final String R_COM_SUCCESS_STATUS = "000000";
+    public static final String R_COM_SUCCESS_MSG = "OK";
+    public static final String R_COM_SUCCESS_MESSAGE = "成功";
+    public static final boolean R_COM_SUCCESS_ERROR = false;
 }

+ 20 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/config/MybatisPlusConfig.java

@@ -0,0 +1,20 @@
+package com.ruoyi.common.core.config;
+
+import com.baomidou.mybatisplus.annotation.DbType;
+import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class MybatisPlusConfig {
+    /**
+     * 新的分页插件,一缓和二缓遵循mybatis的规则,需要设置 MybatisConfiguration#useDeprecatedExecutor = false 避免缓存出现问题(该属性会在旧插件移除后一同移除)
+     */
+    @Bean
+    public MybatisPlusInterceptor mybatisPlusInterceptor() {
+        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
+        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
+        return interceptor;
+    }
+}

+ 1 - 1
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java

@@ -13,7 +13,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
  * 
  * @author ruoyi
  */
-public class BaseEntity implements Serializable
+public class BaseEntity extends BasePageInfo implements Serializable
 {
     private static final long serialVersionUID = 1L;
 

+ 23 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseOrderInfo.java

@@ -0,0 +1,23 @@
+package com.ruoyi.common.core.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class BaseOrderInfo implements Serializable {
+
+    /**
+     * 需要进行排序的字段
+     */
+    @ApiModelProperty("需要排序的字段")
+    private String column;
+
+    /**
+     * 是否正序排列,默认 true
+     */
+    @ApiModelProperty("是否正序排列,默认 true")
+    private boolean asc = true;
+
+}

+ 40 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BasePageInfo.java

@@ -0,0 +1,40 @@
+package com.ruoyi.common.core.domain;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by TerryJ
+ */
+@Data
+public class BasePageInfo implements Serializable {
+
+    /**
+     * 每页显示条数,默认 10
+     */
+    @ApiModelProperty(value = "每页显示条数,默认 10")
+    private long size = 10;
+
+    /**
+     * 当前页
+     */
+    @ApiModelProperty(value = "排序字段信息")
+    private long current = 1;
+
+    /**
+     * 排序字段信息
+     */
+    @ApiModelProperty(value = "排序字段信息")
+    private List<BaseOrderInfo> orders = new ArrayList<>();
+
+    /**
+     * 是否进行 count 查询
+     */
+    @ApiModelProperty(value = "是否进行 count 查询 默认true")
+    private boolean isSearchCount = true;
+
+}

+ 53 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/CodeMsg.java

@@ -0,0 +1,53 @@
+package com.ruoyi.common.core.domain;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * 编码 描述 枚举
+ */
+@Getter
+@AllArgsConstructor
+public enum CodeMsg implements ErrorEnum{
+
+    CODE_MSG_100(100, "操作成功"),
+
+    //系统级别 1xx
+    CODE_MSG_101(101, "参数错误"),
+
+    CODE_MSG_102(102, "签名校验失败"),
+    CODE_MSG_103(103, "登录信息过期,请重新登录"),
+    CODE_MSG_104(104, "禁止重复提交,请稍后再试"),
+    CODE_MSG_105(105, "用户不存在"),
+
+    //用户token 11x
+    CODE_MSG_110(110, "参数不能为空"),
+    CODE_MSG_111(111, "时间戳过期"),
+    CODE_MSG_112(112, "重复请求"),
+    CODE_MSG_113(113, "验签失败"),
+    CODE_MSG_114(114, "解析用户手机号失败"),
+
+    CODE_MSG_199(199, "未知异常"),
+
+
+    //业务级别 2xx
+    CODE_MSG_201(201, "账号或密码不正确"),
+    CODE_MSG_202(202,"验证码错误"),
+    CODE_MSG_221(221, "TOKEN已过期"),
+
+    ;
+
+    private int code;
+    private String msg;
+
+    // 构造方法
+    public static String getMsg(int code) {
+        for (CodeMsg codeMsg : CodeMsg.values()) {
+            if (codeMsg.code == code) {
+                return codeMsg.msg;
+            }
+        }
+        return null;
+    }
+
+}

+ 9 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/ErrorEnum.java

@@ -0,0 +1,9 @@
+package com.ruoyi.common.core.domain;
+
+public interface ErrorEnum {
+
+    int getCode();
+
+    String getMsg();
+
+}

+ 40 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/PageInfo.java

@@ -0,0 +1,40 @@
+package com.ruoyi.common.core.domain;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class PageInfo<T> implements Serializable {
+
+    private static final long serialVersionUID = 8545992873220298798L;
+
+    /**
+     * 总数
+     */
+    private long total = 0;
+
+    /**
+     * 每页显示条数
+     */
+    private long size = 10;
+
+    /**
+     * 当前页
+     */
+    private long current = 1;
+
+    /**
+     * 查询数据列表
+     */
+    private List<T> records = Collections.emptyList();
+    public PageInfo(List<T> records){
+        this.records = records;
+    }
+}

+ 67 - 53
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/R.java

@@ -1,71 +1,72 @@
 package com.ruoyi.common.core.domain;
 
+import com.ruoyi.common.constant.Constants;
+
 import java.io.Serializable;
-import com.ruoyi.common.constant.HttpStatus;
 
 /**
  * 响应信息主体
  *
- * @author ruoyi
+ * @author agile
  */
-public class R<T> implements Serializable
-{
+public class R<T> implements Serializable {
+    /**
+     * 成功
+     */
+    public static final int SUCCESS = Integer.parseInt(Constants.SUCCESS);
+    /**
+     * 失败
+     */
+    public static final int FAIL = Integer.parseInt(Constants.FAIL);
     private static final long serialVersionUID = 1L;
-
-    /** 成功 */
-    public static final int SUCCESS = HttpStatus.SUCCESS;
-
-    /** 失败 */
-    public static final int FAIL = HttpStatus.ERROR;
-
+    private static final String SUCCESS_MSG = "success";
     private int code;
 
     private String msg;
 
     private T data;
 
-    public static <T> R<T> ok()
-    {
-        return restResult(null, SUCCESS, "操作成功");
+    public static <T> R<T> ok() {
+        return restResult(null, SUCCESS, SUCCESS_MSG);
+    }
+
+    public static <T> R<T> create(T data) {
+        return restResult(data, SUCCESS, SUCCESS_MSG);
     }
 
-    public static <T> R<T> ok(T data)
-    {
-        return restResult(data, SUCCESS, "操作成功");
+    public static <T> R<T> ok(T data) {
+        return restResult(data, SUCCESS, SUCCESS_MSG);
     }
 
-    public static <T> R<T> ok(T data, String msg)
-    {
+    public static <T> R<T> ok(T data, String msg) {
         return restResult(data, SUCCESS, msg);
     }
 
-    public static <T> R<T> fail()
-    {
-        return restResult(null, FAIL, "操作失败");
+    public static <T> R<T> fail() {
+        return restResult(null, FAIL, null);
     }
 
-    public static <T> R<T> fail(String msg)
-    {
+    public static <T> R<T> fail(String msg) {
         return restResult(null, FAIL, msg);
     }
 
-    public static <T> R<T> fail(T data)
-    {
-        return restResult(data, FAIL, "操作失败");
+    public static <T> R<T> fail(T data) {
+        return restResult(data, FAIL, null);
     }
 
-    public static <T> R<T> fail(T data, String msg)
-    {
+    public static <T> R<T> fail(T data, String msg) {
         return restResult(data, FAIL, msg);
     }
 
-    public static <T> R<T> fail(int code, String msg)
-    {
+    public static <T> R<T> fail(int code, String msg) {
         return restResult(null, code, msg);
     }
 
-    private static <T> R<T> restResult(T data, int code, String msg)
-    {
+    public static <T> R<T> fail(ErrorEnum errorEnum) {
+        return restResult(null, errorEnum.getCode(), errorEnum.getMsg());
+    }
+
+    private static <T> R<T> restResult(T data, int code, String msg) {
         R<T> apiResult = new R<>();
         apiResult.setCode(code);
         apiResult.setData(data);
@@ -73,43 +74,56 @@ public class R<T> implements Serializable
         return apiResult;
     }
 
-    public int getCode()
-    {
+    public static <T> Boolean isError(R<T> ret) {
+        return !isSuccess(ret);
+    }
+
+    public static <T> Boolean isSuccess(R<T> ret) {
+        return R.SUCCESS == ret.getCode();
+    }
+
+    public void setCodeMsg(CodeMsg codeMsg) {
+        this.code = codeMsg.getCode();
+        this.msg = codeMsg.getMsg();
+    }
+
+    public void setCodeMsg(CodeMsg codeMsg,String... args) {
+        this.setCodeMsg(codeMsg);
+        if (null != args) {
+            this.msg = String.format(codeMsg.getMsg(),args);
+        }
+    }
+
+    public int getCode() {
         return code;
     }
 
-    public void setCode(int code)
-    {
+    public void setCode(int code) {
         this.code = code;
     }
 
-    public String getMsg()
-    {
+    public String getMsg() {
         return msg;
     }
 
-    public void setMsg(String msg)
-    {
+    public void setMsg(String msg) {
         this.msg = msg;
     }
 
-    public T getData()
-    {
+    public T getData() {
         return data;
     }
 
-    public void setData(T data)
-    {
+    public void setData(T data) {
         this.data = data;
     }
 
-    public static <T> Boolean isError(R<T> ret)
-    {
-        return !isSuccess(ret);
-    }
-
-    public static <T> Boolean isSuccess(R<T> ret)
-    {
-        return R.SUCCESS == ret.getCode();
+    @Override
+    public String toString() {
+        return "{" +
+                "code=" + code +
+                ", msg='" + msg + '\'' +
+                ", data=" + data +
+                '}';
     }
 }

+ 56 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/ip/IPUtils.java

@@ -0,0 +1,56 @@
+package com.ruoyi.common.core.ip;
+
+import com.ruoyi.common.utils.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * @Description IP地址
+ * @Author Liming
+ * @Time 2023/08/01
+ */
+public class IPUtils {
+	private static Logger logger = LoggerFactory.getLogger(IPUtils.class);
+
+	/**
+	 * 获取IP地址
+	 * 
+	 * 使用Nginx等反向代理软件, 则不能通过request.getRemoteAddr()获取IP地址
+	 * 如果使用了多级反向代理的话,X-Forwarded-For的值并不止一个,而是一串IP地址,X-Forwarded-For中第一个非unknown的有效IP字符串,则为真实IP地址
+	 */
+	public static String getIpAddr(HttpServletRequest request) {
+    	String ip = null;
+        try {
+            ip = request.getHeader("x-forwarded-for");
+            if (StringUtils.isEmpty(ip) || "unknown".equalsIgnoreCase(ip)) {
+                ip = request.getHeader("Proxy-Client-IP");
+            }
+            if (StringUtils.isEmpty(ip) || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+                ip = request.getHeader("WL-Proxy-Client-IP");
+            }
+            if (StringUtils.isEmpty(ip) || "unknown".equalsIgnoreCase(ip)) {
+                ip = request.getHeader("HTTP_CLIENT_IP");
+            }
+            if (StringUtils.isEmpty(ip) || "unknown".equalsIgnoreCase(ip)) {
+                ip = request.getHeader("HTTP_X_FORWARDED_FOR");
+            }
+            if (StringUtils.isEmpty(ip) || "unknown".equalsIgnoreCase(ip)) {
+                ip = request.getRemoteAddr();
+            }
+        } catch (Exception e) {
+        	logger.error("IPUtils ERROR ", e);
+        }
+        
+//        //使用代理,则获取第一个IP地址
+//        if(StringUtils.isEmpty(ip) && ip.length() > 15) {
+//			if(ip.indexOf(",") > 0) {
+//				ip = ip.substring(0, ip.indexOf(","));
+//			}
+//		}
+        
+        return ip;
+    }
+	
+}

+ 14 - 6
ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java

@@ -1,11 +1,5 @@
 package com.ruoyi.common.core.redis;
 
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.BoundSetOperations;
 import org.springframework.data.redis.core.HashOperations;
@@ -13,6 +7,9 @@ import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.data.redis.core.ValueOperations;
 import org.springframework.stereotype.Component;
 
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+
 /**
  * spring redis 工具类
  *
@@ -265,4 +262,15 @@ public class RedisCache
     {
         return redisTemplate.keys(pattern);
     }
+
+
+
+    public static int incrementInt(final String key) {
+        return incrementInt(key,1);
+    }
+
+    public static int incrementInt(final String key,final int delta) {
+        return incrementInt(key,1);
+    }
+
 }

+ 75 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/sms/SendMessage.java

@@ -0,0 +1,75 @@
+package com.ruoyi.common.core.sms;
+
+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.profile.DefaultProfile;
+import com.aliyuncs.profile.IClientProfile;
+
+/**
+ * Created on 20/5/19.
+ * 短信API产品的DEMO程序,工程中包含了一个SmsDemo类,直接通过
+ * 执行main函数即可体验短信产品API功能(只需要将AK替换成开通了云通信-短信产品功能的AK即可)
+ * <p>
+ * 备注:Demo工程编码采用UTF-8
+ * 国际短信发送请勿参照此DEMO
+ */
+public class SendMessage {
+    //产品名称:云通信短信API产品,开发者无需替换
+    static final String product = "Dysmsapi";
+    //产品域名,开发者无需替换
+    static final String domain = "dysmsapi.aliyuncs.com";
+
+    // TODO 此处需要替换成开发者自己的AK(在阿里云访问控制台寻找)
+    static final String accessKeyId = "LTAI5tKvxXUQ61e5PSm3mzQ1";
+    static final String accessKeySecret = "WEzhPLHWqEINBbiLn168g2nP1H8Cje";
+
+    public static SendSmsResponse sendSms(String phone, String code) throws ClientException {
+
+        //可自助调整超时时间
+        System.setProperty("sun.net.client.defaultConnectTimeout", "10000");
+        System.setProperty("sun.net.client.defaultReadTimeout", "10000");
+
+        //初始化acsClient,暂不支持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();
+        //必填:待发送手机号
+        request.setPhoneNumbers(phone);
+        //必填:短信签名-可在短信控制台中找到
+        request.setSignName("阿里云短信测试");
+        //必填:短信模板-可在短信控制台中找到
+        request.setTemplateCode("SMS_154950909");
+        //可选:模板中的变量替换JSON串,如模板内容为"亲爱的${name},您的验证码为${code}"时,此处的值为
+        request.setTemplateParam("{\"code\":\"" + code + "\"}");
+
+        //选填-上行短信扩展码(无特殊需求用户请忽略此字段)
+        //request.setSmsUpExtendCode("90997");
+
+        //可选:outId为提供给业务方扩展字段,最终在短信回执消息中将此值带回给调用者
+        request.setOutId("yourOutId");
+
+        //hint 此处可能会抛出异常,注意catch
+        SendSmsResponse sendSmsResponse = acsClient.getAcsResponse(request);
+
+        return sendSmsResponse;
+    }
+
+
+    public static void main(String[] args) throws ClientException, InterruptedException {
+
+        //发短信
+        SendSmsResponse response = sendSms("123456789", "6666");
+        System.out.println("短信接口返回的数据----------------");
+        System.out.println("Code=" + response.getCode());
+        System.out.println("Message=" + response.getMessage());
+        System.out.println("RequestId=" + response.getRequestId());
+        System.out.println("BizId=" + response.getBizId());
+        
+    }
+}

+ 15 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/ConstantUtil.java

@@ -0,0 +1,15 @@
+package com.ruoyi.common.utils;
+
+/**
+ * @Author CHAILEILEI
+ * @Time 2021/11/8 下午3:23
+ * @Version V1.0.0
+ */
+public class ConstantUtil {
+
+   public static final String PICTURE = ".png|.gif|.jpg|.jpeg";
+
+   public static final String APK = ".apk";
+
+   public static final String SDK = ".jar";
+}

+ 1 - 1
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java

@@ -144,7 +144,7 @@ public class FileUploadUtils
     {
         int dirLastIndex = RuoYiConfig.getProfile().length() + 1;
         String currentDir = StringUtils.substring(uploadDir, dirLastIndex);
-        return Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName;
+        return Constants.UPLOADPATH + "/" + currentDir + "/" + fileName;
     }
 
     /**

+ 16 - 24
ruoyi-framework/src/main/java/com/ruoyi/framework/config/MyBatisConfig.java

@@ -1,15 +1,8 @@
 package com.ruoyi.framework.config;
 
-import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
-import com.ruoyi.common.utils.StringUtils;
-import org.apache.ibatis.io.VFS;
-import org.apache.ibatis.session.SqlSessionFactory;
-import org.mybatis.spring.boot.autoconfigure.SpringBootVFS;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.core.env.Environment;
-import org.springframework.core.io.DefaultResourceLoader;
 import org.springframework.core.io.Resource;
 import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
 import org.springframework.core.io.support.ResourcePatternResolver;
@@ -18,7 +11,6 @@ import org.springframework.core.type.classreading.MetadataReader;
 import org.springframework.core.type.classreading.MetadataReaderFactory;
 import org.springframework.util.ClassUtils;
 
-import javax.sql.DataSource;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -114,20 +106,20 @@ public class MyBatisConfig
         return resources.toArray(new Resource[resources.size()]);
     }
 
-    @Bean
-    public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception
-    {
-        String typeAliasesPackage = env.getProperty("mybatis.typeAliasesPackage");
-        String mapperLocations = env.getProperty("mybatis.mapperLocations");
-        String configLocation = env.getProperty("mybatis.configLocation");
-        typeAliasesPackage = setTypeAliasesPackage(typeAliasesPackage);
-        VFS.addImplClass(SpringBootVFS.class);
-
-        final MybatisSqlSessionFactoryBean sessionFactory = new MybatisSqlSessionFactoryBean();
-        sessionFactory.setDataSource(dataSource);
-        sessionFactory.setTypeAliasesPackage(typeAliasesPackage);
-        sessionFactory.setMapperLocations(resolveMapperLocations(StringUtils.split(mapperLocations, ",")));
-        sessionFactory.setConfigLocation(new DefaultResourceLoader().getResource(configLocation));
-        return sessionFactory.getObject();
-    }
+//    @Bean
+//    public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception
+//    {
+//        String typeAliasesPackage = env.getProperty("mybatis.typeAliasesPackage");
+//        String mapperLocations = env.getProperty("mybatis.mapperLocations");
+//        String configLocation = env.getProperty("mybatis.configLocation");
+//        typeAliasesPackage = setTypeAliasesPackage(typeAliasesPackage);
+//        VFS.addImplClass(SpringBootVFS.class);
+//
+//        final MybatisSqlSessionFactoryBean sessionFactory = new MybatisSqlSessionFactoryBean();
+//        sessionFactory.setDataSource(dataSource);
+//        sessionFactory.setTypeAliasesPackage(typeAliasesPackage);
+//        sessionFactory.setMapperLocations(resolveMapperLocations(StringUtils.split(mapperLocations, ",")));
+//        sessionFactory.setConfigLocation(new DefaultResourceLoader().getResource(configLocation));
+//        return sessionFactory.getObject();
+//    }
 }

+ 2 - 0
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java

@@ -117,6 +117,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                 // 静态资源,可匿名访问
                 .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
                 .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
+                .antMatchers("/platform/**").permitAll() // TODO: 2023/7/14 暂时跳过权限
+                .antMatchers("/api/v1/**").permitAll() // TODO: 2023/7/19 暂时跳过权限
                 // 除上面外的所有请求全部需要鉴权认证
                 .anyRequest().authenticated()
                 .and()

+ 29 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/AppConfigLibrary.java

@@ -0,0 +1,29 @@
+package com.ruoyi.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ruoyi.common.annotation.Excel;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author: LiMingMing
+ * @Date: 2023/7/14 15:15
+ * @Description: 统一查询信息加分页信息
+ **/
+@Data
+@TableName("t_app_config_library")
+public class AppConfigLibrary implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**id */
+    @TableId( value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /** data */
+    @Excel(name = "基本库名")
+    private String data;
+
+}

+ 21 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/BaseParam.java

@@ -0,0 +1,21 @@
+package com.ruoyi.system.domain;
+
+import com.ruoyi.common.core.domain.PageInfo;
+import lombok.Data;
+import org.apache.poi.ss.formula.functions.T;
+
+/**
+ * @Author: LiMingMing
+ * @Date: 2023/7/14 15:15
+ * @Description: 统一查询信息加分页信息
+ **/
+@Data
+public class BaseParam extends PageInfo<T> {
+
+    private Long id;
+
+    private Long[] ids;
+
+    private String name;
+
+}

+ 112 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/BasicLibrary.java

@@ -0,0 +1,112 @@
+package com.ruoyi.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ruoyi.common.annotation.Excel;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 基础库管理对象 t_basic_library
+ * 
+ * @author liming
+ * @date 2023-07-13
+ */
+@Data
+@TableName("t_basic_library")
+public class BasicLibrary   implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /** 基本库id */
+    @TableId( value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /** 基本库名 */
+    @Excel(name = "基本库名")
+    private String name;
+
+    /** 波段值  默认38000 */
+    @Excel(name = "波段值  默认38000")
+    private Long bandValue;
+
+    /** 引导码  500,100  校验size=2 */
+    @Excel(name = "引导码  500,100  校验size=2")
+    private String bootCode;
+
+    /** 引导码发送次数 默认1  校验大于0 */
+    @Excel(name = "引导码发送次数 默认1  校验大于0")
+    private Long bootCodeSend;
+
+    /** 引导码启用状态 0启用  1禁用 */
+    @Excel(name = "引导码启用状态  0启用  1禁用")
+    private String bootCodeStatus;
+
+    /** 同步码  500,100  校验size=2 */
+    @Excel(name = "引导码  500,100  校验size=2")
+    private String synchronizeCode;
+
+    /** 同步码发送次数 默认1  校验大于0 */
+    @Excel(name = "引导码发送次数 默认1  校验大于0")
+    private Long synchronizeCodeSend;
+
+    /** 同步码启用状态 0启用  1禁用 */
+    @Excel(name = "同步码启用状态 0启用  1禁用")
+    private String synchronizeCodeStatus;
+
+    /** 重复码 */
+    @Excel(name = "重复码")
+    private String repeatCode;
+
+    /** 地址码 */
+    @Excel(name = "地址码")
+    private String addressCode;
+
+    /** 地址码启用状态 0启用  1禁用 */
+    @Excel(name = "地址码启用状态 0启用  1禁用")
+    private String addressCodeStatus;
+
+    /** 数据码 */
+    @Excel(name = "数据码")
+    private String dateCode;
+
+    /** 结束码 */
+    @Excel(name = "结束码")
+    private String overCode;
+
+
+    /** 数据反码启用状态  0启用 1禁用 */
+    @Excel(name = "数据反码启用状态  0启用 1禁用")
+    private String dataInverseCodeStatus;
+
+    /** 二进制0   560,565  高电平低电平*/
+    @Excel(name = "二进制0")
+    private String dateBinary0;
+
+    /** 二进制1 */
+    @Excel(name = "二进制1")
+    private String dateBinary1;
+
+
+    /** 状态(0使用中 1未使用) */
+    @Excel(name = "状态", readConverterExp = "0=使用中,1=未使用")
+    private String status;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 创建者 */
+    private String createBy;
+
+    /** 创建时间 */
+    private Date createTime;
+
+    /** 更新者 */
+    private String updateBy;
+
+    /** 更新时间 */
+    private Date updateTime;
+
+}

+ 84 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/ComponentsLibrary.java

@@ -0,0 +1,84 @@
+package com.ruoyi.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ruoyi.common.annotation.Excel;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 组件库对象 t_components_library
+ * 
+ * @author liming
+ * @date 2023-07-13
+ */
+@Data
+@TableName("t_components_library")
+public class ComponentsLibrary implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /** 组件id */
+    @TableId( value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /** 组件名称 */
+    @Excel(name = "组件名称")
+    private String name;
+
+    /** 基础库id */
+    @Excel(name = "基础库id")
+    private Long baseId;
+
+    /** 组件样式 */
+    @Excel(name = "组件样式")
+    private String bntStyle;
+
+    /** 组件类型   1开关型  2加减形 */
+    @Excel(name = "组件类型   1开关型  2加减形")
+    private String typeNum;
+
+    /** 加减型  最大值 */
+    @Excel(name = "加减型  最大值")
+    private Long addSubMax;
+
+    /** 加减型  最小值 */
+    @Excel(name = "加减型  最小值")
+    private Long addSubMin;
+
+    /** 命令参数 */
+    @Excel(name = "命令参数")
+    private String dictateParameter;
+
+    /** 默认值 */
+    @Excel(name = "默认值")
+    private String defValue;
+
+    /** 重复码 */
+    @Excel(name = "重复码")
+    private Long repeatCode;
+
+    /** 状态(0使用中 1未使用) */
+    @Excel(name = "状态", readConverterExp = "0=使用中,1=未使用")
+    private String status;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+
+    /** 创建者 */
+    private String createBy;
+
+    /** 创建时间 */
+    private Date createTime;
+
+    /** 更新者 */
+    private String updateBy;
+
+    /** 更新时间 */
+    private Date updateTime;
+
+
+}

+ 57 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/QrLibrary.java

@@ -0,0 +1,57 @@
+package com.ruoyi.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ruoyi.common.annotation.Excel;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 二维码对象 t_qr_library
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+@Data
+@TableName("t_qr_library")
+public class QrLibrary  implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /** 二维码id */
+    @TableId( value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /** 二维码名称 */
+    @Excel(name = "二维码名称")
+    private String name;
+
+    /** 二维码名称 */
+    @Excel(name = "上传图片名称")
+    private String imageName;
+
+    /** 二维码连接 */
+    @Excel(name = "二维码连接")
+    private String url;
+
+    /** 状态(0使用中 1未使用) */
+    @Excel(name = "状态", readConverterExp = "0=使用中,1=未使用")
+    private String status;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 创建者 */
+    private String createBy;
+
+    /** 创建时间 */
+    private Date createTime;
+
+    /** 更新者 */
+    private String updateBy;
+
+    /** 更新时间 */
+    private Date updateTime;
+}

+ 66 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/TemplateLibrary.java

@@ -0,0 +1,66 @@
+package com.ruoyi.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ruoyi.common.annotation.Excel;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 模板库对象 t_template_library
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+@Data
+@TableName("t_template_library")
+public class TemplateLibrary implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /** 模板id */
+    @TableId( value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /** 基础库id */
+    @Excel(name = "基础库id")
+    private Long baseId;
+
+    /** 模板名称 */
+    @Excel(name = "模板名称")
+    private String name;
+
+    /** 关联组件信息 */
+    @Excel(name = "关联组信息")
+    private String components;
+
+    /** 图标地址url */
+    @Excel(name = "图标地址Url")
+    private String iconUrl;
+
+    /** 背景图片Url */
+    @Excel(name = "背景图片Url")
+    private String backgroundPictureUrl;
+
+    /** 状态(0使用中 1未使用) */
+    @Excel(name = "状态", readConverterExp = "0=使用中,1=未使用")
+    private String status;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 创建者 */
+    private String createBy;
+
+    /** 创建时间 */
+    private Date createTime;
+
+    /** 更新者 */
+    private String updateBy;
+
+    /** 更新时间 */
+    private Date updateTime;
+
+}

+ 24 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/UploadInfo.java

@@ -0,0 +1,24 @@
+package com.ruoyi.system.domain;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author: LiMingMing
+ * @Date: 2023/7/20 16:34
+ * @Description: TODO
+ **/
+@Data
+public class UploadInfo implements Serializable {
+
+    /**
+     * 文件名
+     */
+    private String fileName;
+
+    /**
+     * 文件地址
+     */
+    private String url;
+}

+ 55 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/UserAddress.java

@@ -0,0 +1,55 @@
+package com.ruoyi.system.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ruoyi.common.annotation.Excel;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 用户地址信息对象 t_user_address
+ * 
+ * @author ruoyi
+ * @date 2023-08-01
+ */
+@Data
+@TableName("t_user_address")
+public class UserAddress implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /** id */
+    private Long id;
+
+    /** 关联用户id */
+    @Excel(name = "关联用户id")
+    private Long userId;
+
+    /** 经度 */
+    @Excel(name = "经度")
+    private String longitude;
+
+    /** 纬度 */
+    @Excel(name = "纬度")
+    private String latitude;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 创建者 */
+    private String createBy;
+
+    /** 创建时间 */
+    private Date createTime;
+
+    /** 更新者 */
+    private String updateBy;
+
+    /** 更新时间 */
+    private Date updateTime;
+
+    /** 用户手机号 */
+    @TableField(exist = false)
+    private String userPhone;
+}

+ 57 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/UserInfo.java

@@ -0,0 +1,57 @@
+package com.ruoyi.system.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ruoyi.common.annotation.Excel;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 用户信息对象 t_user_info
+ * 
+ * @author ruoyi
+ * @date 2023-08-01
+ */
+@Data
+@TableName("t_user_info")
+public class UserInfo implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /** id */
+    private Long id;
+
+    /** 用户手机号 */
+    @Excel(name = "用户手机号")
+    private String userPhone;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 创建者 */
+    private String createBy;
+
+    /** 创建时间 */
+    private Date createTime;
+
+    /** 更新者 */
+    private String updateBy;
+
+    /** 更新时间 */
+    private Date updateTime;
+
+
+    /**
+     * 验证码的key
+     */
+    @TableField(exist = false)
+    private String keyCode;
+
+    /**
+     * 验证码的
+     */
+    @TableField(exist = false)
+    private String code;
+
+}

+ 92 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/ComponentsAndBasicVo.java

@@ -0,0 +1,92 @@
+package com.ruoyi.system.domain.vo;
+
+import lombok.Data;
+
+/**
+ * @Author: LiMingMing
+ * @Date: 2023/7/17 14:22
+ * @Description: TODO
+ **/
+@Data
+public class ComponentsAndBasicVo {
+    private static final long serialVersionUID = 1L;
+
+    /** 组件id */
+    private Long id;
+
+    /** 组件名称 */
+    private String name;
+
+    /** 基础库id */
+    private Long baseId;
+
+    /** 组件样式 */
+    private String bntStyle;
+
+    /** 组件类型   1开关型  2加减形 */
+    private String typeNum;
+
+    /** 加减型  最大值 */
+    private Long addSubMax;
+
+    /** 加减型  最小值 */
+    private Long addSubMin;
+
+    /** 命令参数 */
+    private String dictateParameter;
+
+    /** 默认值 */
+    private String defValue;
+
+    /** 重复码 */
+    private Long repeatCode;
+
+    /** 基本库名 */
+    private String baseName;
+
+    /** 波段值  默认38000 */
+    private Long bandValue;
+
+    /** 引导码  500,100  校验size=2 */
+    private String bootCode;
+
+    /** 引导码发送次数 默认1  校验大于0 */
+    private Long bootCodeSend;
+
+    /** 引导码启用状态 0启用  1禁用 */
+    private String bootCodeStatus;
+
+    /** 同步码  500,100  校验size=2 */
+    private String synchronizeCode;
+
+    /** 同步码发送次数 默认1  校验大于0 */
+    private Long synchronizeCodeSend;
+
+    /** 同步码启用状态 0启用  1禁用 */
+    private String synchronizeCodeStatus;
+
+    /** 重复码 */
+    private String baseRepeatCode;
+
+    /** 地址码 */
+    private String addressCode;
+
+    /** 地址码启用状态 0启用  1禁用 */
+    private String addressCodeStatus;
+
+    /** 数据码 */
+    private String dateCode;
+
+    /** 结束码 */
+    private String overCode;
+
+    /** 数据反码启用状态  0启用 1禁用 */
+    private String dataInverseCodeStatus;
+
+    /** 二进制0   560,565  高电平低电平*/
+    private String dateBinary0;
+
+    /** 二进制1 */
+    private String dateBinary1;
+
+}

+ 38 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/GetDeviceInfoVo.java

@@ -0,0 +1,38 @@
+package com.ruoyi.system.domain.vo;
+
+import com.ruoyi.system.domain.BasicLibrary;
+import lombok.Data;
+
+/**
+ * @Author: LiMingMing
+ * @Date: 2023/7/13 17:55
+ **/
+@Data
+public class GetDeviceInfoVo {
+
+    /**波段值*/
+    private Long bandValue;
+
+    /**数据码*/
+//    private Integer[] bootCodeLow;
+
+    private BasicLibrary basicLibrary;
+
+    /**
+     * 按钮参数列表
+     */
+//    private List<ComponentsLibrary> componentsList;
+
+    /**
+     * 按钮参数信息
+     */
+    private String componentsString;
+
+    /**
+     * 背景图Url
+     */
+    private String backgroundPictureUrl;
+
+
+
+}

+ 19 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/SmsResponseVo.java

@@ -0,0 +1,19 @@
+package com.ruoyi.system.domain.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Author: LiMingMing
+ * @Date: 2023/8/1 14:54
+ * @Description: TODO
+ **/
+@Data
+public class SmsResponseVo implements Serializable {
+
+    private String code;
+    private String message;
+    private String keyCode;
+}
+

+ 15 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/AppConfigLibraryMapper.java

@@ -0,0 +1,15 @@
+package com.ruoyi.system.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.system.domain.AppConfigLibrary;
+
+/**
+ * app配置
+ * 
+ * @author liming
+ * @date 2023-07-19
+ */
+public interface AppConfigLibraryMapper extends BaseMapper<AppConfigLibrary> {
+
+}

+ 15 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/BasicLibraryMapper.java

@@ -0,0 +1,15 @@
+package com.ruoyi.system.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.system.domain.BasicLibrary;
+
+/**
+ * 基础库管理Mapper接口
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+public interface BasicLibraryMapper extends BaseMapper<BasicLibrary> {
+
+}

+ 15 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/ComponentsLibraryMapper.java

@@ -0,0 +1,15 @@
+package com.ruoyi.system.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.system.domain.ComponentsLibrary;
+
+/**
+ * 组件库Mapper接口
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+public interface ComponentsLibraryMapper extends BaseMapper<ComponentsLibrary> {
+
+
+}

+ 15 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/QrLibraryMapper.java

@@ -0,0 +1,15 @@
+package com.ruoyi.system.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.system.domain.QrLibrary;
+
+/**
+ * 二维码Mapper接口
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+public interface QrLibraryMapper  extends BaseMapper<QrLibrary> {
+
+
+}

+ 14 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TemplateLibraryMapper.java

@@ -0,0 +1,14 @@
+package com.ruoyi.system.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.system.domain.TemplateLibrary;
+
+/**
+ * 模板库Mapper接口
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+public interface TemplateLibraryMapper extends BaseMapper<TemplateLibrary> {
+
+}

+ 16 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserAddressMapper.java

@@ -0,0 +1,16 @@
+package com.ruoyi.system.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.system.domain.UserAddress;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 用户地址信息Mapper接口
+ * 
+ * @author liming
+ * @date 2023-08-01
+ */
+public interface UserAddressMapper extends BaseMapper<UserAddress> {
+
+    UserAddress getAddress(@Param("userId") Long userId);
+}

+ 14 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/UserInfoMapper.java

@@ -0,0 +1,14 @@
+package com.ruoyi.system.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.system.domain.UserInfo;
+
+/**
+ * 用户信息Mapper接口
+ * 
+ * @author liming
+ * @date 2023-08-01
+ */
+public interface UserInfoMapper extends BaseMapper<UserInfo> {
+
+}

+ 16 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/AppConfigLibraryService.java

@@ -0,0 +1,16 @@
+package com.ruoyi.system.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.system.domain.AppConfigLibrary;
+
+/**
+ * App配置
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+public interface AppConfigLibraryService extends IService<AppConfigLibrary> {
+
+
+
+}

+ 16 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/BasicLibraryService.java

@@ -0,0 +1,16 @@
+package com.ruoyi.system.service;
+
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.system.domain.BasicLibrary;
+
+/**
+ * 基础库管理Service接口
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+public interface BasicLibraryService extends IService<BasicLibrary> {
+
+
+}

+ 23 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/ComponentsLibraryService.java

@@ -0,0 +1,23 @@
+package com.ruoyi.system.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.system.domain.ComponentsLibrary;
+import com.ruoyi.system.domain.vo.ComponentsAndBasicVo;
+
+import java.util.List;
+
+/**
+ * 组件库Service接口
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+public interface ComponentsLibraryService extends IService<ComponentsLibrary> {
+
+    /**
+     * 获取全部的组件按钮信息
+     * @return
+     */
+    List<ComponentsAndBasicVo> getAllComponentsInfo();
+
+}

+ 15 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/QrLibraryService.java

@@ -0,0 +1,15 @@
+package com.ruoyi.system.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.system.domain.QrLibrary;
+
+/**
+ * 二维码Service接口
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+public interface QrLibraryService  extends IService<QrLibrary> {
+
+
+}

+ 14 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/TemplateLibraryService.java

@@ -0,0 +1,14 @@
+package com.ruoyi.system.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.system.domain.TemplateLibrary;
+
+/**
+ * 模板库Service接口
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+public interface TemplateLibraryService  extends IService<TemplateLibrary> {
+
+}

+ 19 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/UserAddressService.java

@@ -0,0 +1,19 @@
+package com.ruoyi.system.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.system.domain.UserAddress;
+
+/**
+ * 用户地址信息Service接口
+ * 
+ * @author liming
+ * @date 2023-08-01
+ */
+public interface UserAddressService extends IService<UserAddress> {
+    /**
+     * 根据用户id查询最新一条用户的地址信息
+     * @param id
+     * @return
+     */
+    UserAddress getAddress(Long userId);
+}

+ 14 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/UserInfoService.java

@@ -0,0 +1,14 @@
+package com.ruoyi.system.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.system.domain.UserInfo;
+
+/**
+ * 用户信息Service接口
+ * 
+ * @author liming
+ * @date 2023-08-01
+ */
+public interface UserInfoService  extends IService<UserInfo> {
+
+}

+ 20 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AppConfigLibraryServiceImpl.java

@@ -0,0 +1,20 @@
+package com.ruoyi.system.service.impl;
+
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.system.domain.AppConfigLibrary;
+import com.ruoyi.system.mapper.AppConfigLibraryMapper;
+import com.ruoyi.system.service.AppConfigLibraryService;
+import org.springframework.stereotype.Service;
+
+/**
+ * APP配置
+ * 
+ * @author liming
+ * @date 2023-07-19
+ */
+@Service
+public class AppConfigLibraryServiceImpl extends ServiceImpl<AppConfigLibraryMapper, AppConfigLibrary> implements AppConfigLibraryService {
+
+
+}

+ 20 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BasicLibraryServiceImpl.java

@@ -0,0 +1,20 @@
+package com.ruoyi.system.service.impl;
+
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.system.domain.BasicLibrary;
+import com.ruoyi.system.mapper.BasicLibraryMapper;
+import com.ruoyi.system.service.BasicLibraryService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 基础库管理Service业务层处理
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+@Service
+public class BasicLibraryServiceImpl  extends ServiceImpl<BasicLibraryMapper, BasicLibrary> implements BasicLibraryService {
+
+
+}

+ 66 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ComponentsLibraryServiceImpl.java

@@ -0,0 +1,66 @@
+package com.ruoyi.system.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.system.domain.BasicLibrary;
+import com.ruoyi.system.domain.ComponentsLibrary;
+import com.ruoyi.system.domain.vo.ComponentsAndBasicVo;
+import com.ruoyi.system.mapper.ComponentsLibraryMapper;
+import com.ruoyi.system.service.BasicLibraryService;
+import com.ruoyi.system.service.ComponentsLibraryService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 组件库Service业务层处理
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+@Service
+public class ComponentsLibraryServiceImpl extends ServiceImpl<ComponentsLibraryMapper, ComponentsLibrary> implements ComponentsLibraryService {
+
+    @Autowired
+    private BasicLibraryService basicLibraryService;
+
+    @Override
+    public List<ComponentsAndBasicVo> getAllComponentsInfo() {
+        List<ComponentsAndBasicVo> voList = new ArrayList<>();
+        List<ComponentsLibrary> basicLibraryList = this.list(new LambdaQueryWrapper<ComponentsLibrary>().eq(ComponentsLibrary::getDelFlag,0));
+        for (ComponentsLibrary componentsLibrary : basicLibraryList) {
+            ComponentsAndBasicVo componentsAndBasicVo = new ComponentsAndBasicVo();
+            componentsAndBasicVo.setId(componentsLibrary.getId());
+            componentsAndBasicVo.setName(componentsLibrary.getName());
+            componentsAndBasicVo.setBaseId(componentsLibrary.getBaseId());
+            componentsAndBasicVo.setBntStyle(componentsLibrary.getBntStyle());
+            componentsAndBasicVo.setTypeNum(componentsLibrary.getTypeNum());
+            componentsAndBasicVo.setAddSubMax(componentsLibrary.getAddSubMax());
+            componentsAndBasicVo.setAddSubMin(componentsLibrary.getAddSubMin());
+            componentsAndBasicVo.setDictateParameter(componentsLibrary.getDictateParameter());
+            componentsAndBasicVo.setDefValue(componentsLibrary.getDefValue());
+            componentsAndBasicVo.setRepeatCode(componentsLibrary.getRepeatCode());
+            BasicLibrary one = basicLibraryService.getOne(new LambdaQueryWrapper<BasicLibrary>().eq(BasicLibrary::getId, componentsLibrary.getBaseId()), false);
+            componentsAndBasicVo.setBaseName(one.getName());
+            componentsAndBasicVo.setBandValue(one.getBandValue());
+            componentsAndBasicVo.setBootCode(one.getBootCode());
+            componentsAndBasicVo.setBootCodeSend(one.getBootCodeSend());
+            componentsAndBasicVo.setBootCodeStatus(one.getBootCodeStatus());
+            componentsAndBasicVo.setSynchronizeCode(one.getSynchronizeCode());
+            componentsAndBasicVo.setSynchronizeCodeSend(one.getSynchronizeCodeSend());
+            componentsAndBasicVo.setSynchronizeCodeStatus(one.getAddressCodeStatus());
+            componentsAndBasicVo.setBaseRepeatCode(one.getRepeatCode());
+            componentsAndBasicVo.setAddressCode(one.getAddressCode());
+            componentsAndBasicVo.setAddressCodeStatus(one.getAddressCodeStatus());
+            componentsAndBasicVo.setDateCode(one.getDateCode());
+            componentsAndBasicVo.setOverCode(one.getOverCode());
+            componentsAndBasicVo.setDataInverseCodeStatus(one.getDataInverseCodeStatus());
+            componentsAndBasicVo.setDateBinary0(one.getDateBinary0());
+            componentsAndBasicVo.setDateBinary1(one.getDateBinary1());
+            voList.add(componentsAndBasicVo);
+        }
+        return voList;
+    }
+}

+ 19 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/QrLibraryServiceImpl.java

@@ -0,0 +1,19 @@
+package com.ruoyi.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.system.domain.QrLibrary;
+import com.ruoyi.system.mapper.QrLibraryMapper;
+import com.ruoyi.system.service.QrLibraryService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 二维码Service业务层处理
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+@Service
+public class QrLibraryServiceImpl  extends ServiceImpl<QrLibraryMapper, QrLibrary> implements QrLibraryService {
+
+
+}

+ 10 - 3
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java

@@ -1,11 +1,12 @@
 package com.ruoyi.system.service.impl;
 
-import java.util.List;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
 import com.ruoyi.system.domain.SysLogininfor;
 import com.ruoyi.system.mapper.SysLogininforMapper;
 import com.ruoyi.system.service.ISysLogininforService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
 
 /**
  * 系统访问日志情况信息 服务层处理
@@ -27,6 +28,12 @@ public class SysLogininforServiceImpl implements ISysLogininforService
     @Override
     public void insertLogininfor(SysLogininfor logininfor)
     {
+        switch (logininfor.getStatus()){
+            case "200":
+                logininfor.setStatus("0");
+            case "444":
+                logininfor.setStatus("1");
+        }
         logininforMapper.insertLogininfor(logininfor);
     }
 

+ 18 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TemplateLibraryServiceImpl.java

@@ -0,0 +1,18 @@
+package com.ruoyi.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.system.domain.TemplateLibrary;
+import com.ruoyi.system.mapper.TemplateLibraryMapper;
+import com.ruoyi.system.service.TemplateLibraryService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 模板库Service业务层处理
+ * 
+ * @author liming
+ * @date 2023-07-12
+ */
+@Service
+public class TemplateLibraryServiceImpl  extends ServiceImpl<TemplateLibraryMapper, TemplateLibrary> implements TemplateLibraryService {
+
+}

+ 25 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserAddressServiceImpl.java

@@ -0,0 +1,25 @@
+package com.ruoyi.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.system.domain.UserAddress;
+import com.ruoyi.system.mapper.UserAddressMapper;
+import com.ruoyi.system.service.UserAddressService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 用户地址信息Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2023-08-01
+ */
+@Service
+public class UserAddressServiceImpl  extends ServiceImpl<UserAddressMapper, UserAddress> implements UserAddressService {
+    @Autowired
+    private UserAddressMapper userAddressMapper;
+
+    @Override
+    public UserAddress getAddress(Long userId) {
+        return userAddressMapper.getAddress(userId);
+    }
+}

+ 18 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/UserInfoServiceImpl.java

@@ -0,0 +1,18 @@
+package com.ruoyi.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.system.domain.UserInfo;
+import com.ruoyi.system.mapper.UserInfoMapper;
+import com.ruoyi.system.service.UserInfoService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 用户信息Service业务层处理
+ * 
+ * @author liming
+ * @date 2023-08-01
+ */
+@Service
+public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> implements UserInfoService {
+
+}

+ 18 - 0
ruoyi-system/src/main/resources/mapper/system/platform/AppConfigLibraryMapper.xml

@@ -0,0 +1,18 @@
+<?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.ruoyi.system.mapper.AppConfigLibraryMapper">
+    
+    <resultMap type="AppConfigLibrary" id="AppConfigLibraryResult">
+        <result property="id"    column="id"    />
+        <result property="data"    column="data"    />
+    </resultMap>
+
+    <sql id="selectBasicLibraryVo">
+        select id, data from t_app_config_library
+    </sql>
+
+
+
+</mapper>

+ 29 - 0
ruoyi-system/src/main/resources/mapper/system/platform/BasicLibraryMapper.xml

@@ -0,0 +1,29 @@
+<?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.ruoyi.system.mapper.BasicLibraryMapper">
+    
+    <resultMap type="BasicLibrary" id="BasicLibraryResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="bandValue"    column="band_value"    />
+        <result property="bootCode"    column="boot_code"    />
+        <result property="bootCodeSend"    column="boot_code_send"    />
+        <result property="dateCode"    column="date_code"    />
+        <result property="overCode"    column="over_code"    />
+        <result property="status"    column="status"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectBasicLibraryVo">
+        select id, name, band_value, boot_code, boot_code_send, date_code, over_code, status, del_flag, create_by, create_time, update_by, update_time from t_basic_library
+    </sql>
+
+
+
+</mapper>

+ 30 - 0
ruoyi-system/src/main/resources/mapper/system/platform/ComponentsLibraryMapper.xml

@@ -0,0 +1,30 @@
+<?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.ruoyi.system.mapper.ComponentsLibraryMapper">
+    
+    <resultMap type="ComponentsLibrary" id="ComponentsLibraryResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="bntStyle"    column="bnt_style"    />
+        <result property="typeNum"    column="type_num"    />
+        <result property="addSubMax"    column="add_sub_max"    />
+        <result property="addSubMin"    column="add_sub_min"    />
+        <result property="dictateParameter"    column="dictate_parameter"    />
+        <result property="defValue"    column="def_value"    />
+        <result property="repeatCode"    column="repeat_code"    />
+        <result property="status"    column="status"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectComponentsLibraryVo">
+        select id, name, bnt_style, type_num, add_sub_max, add_sub_min, dictate_parameter, def_value, repeat_code, status, del_flag, create_by, create_time, update_by, update_time from t_components_library
+    </sql>
+
+
+</mapper>

+ 26 - 0
ruoyi-system/src/main/resources/mapper/system/platform/QrLibraryMapper.xml

@@ -0,0 +1,26 @@
+<?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.ruoyi.system.mapper.QrLibraryMapper">
+    
+    <resultMap type="QrLibrary" id="QrLibraryResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="imageName"    column="image_name"    />
+        <result property="url"    column="url"    />
+        <result property="status"    column="status"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectQrLibraryVo">
+        select id, image_name, name, url, status, del_flag, create_by, create_time, update_by, update_time from t_qr_library
+    </sql>
+
+
+
+</mapper>

+ 26 - 0
ruoyi-system/src/main/resources/mapper/system/platform/TemplateLibraryMapper.xml

@@ -0,0 +1,26 @@
+<?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.ruoyi.system.mapper.TemplateLibraryMapper">
+    
+    <resultMap type="TemplateLibrary" id="TemplateLibraryResult">
+        <result property="id"    column="id"    />
+        <result property="baseId"    column="base_id"    />
+        <result property="name"    column="name"    />
+        <result property="components"    column="components"    />
+        <result property="status"    column="status"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectTemplateLibraryVo">
+        select id, base_id, name, components_id, status, del_flag, create_by, create_time, update_by, update_time from t_template_library
+    </sql>
+
+
+
+</mapper>

+ 33 - 0
ruoyi-system/src/main/resources/mapper/system/platform/UserAddressMapper.xml

@@ -0,0 +1,33 @@
+<?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.ruoyi.system.mapper.UserAddressMapper">
+    
+    <resultMap type="UserAddress" id="UserAddressResult">
+        <result property="id"    column="id"    />
+        <result property="userId"    column="user_id"    />
+        <result property="longitude"    column="longitude"    />
+        <result property="latitude"    column="latitude"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectTUserAddressVo">
+        select id, user_id, longitude,latitude, del_flag, create_by, create_time, update_by, update_time from t_user_address
+    </sql>
+
+    <select id="getAddress" resultType="com.ruoyi.system.domain.UserAddress">
+        SELECT user_id,longitude,latitude,create_time
+        FROM t_user_address
+        WHERE
+            del_flag = 0 AND user_id = #{userId}
+        ORDER BY create_time DESC
+            LIMIT 1
+    </select>
+
+
+</mapper>

+ 22 - 0
ruoyi-system/src/main/resources/mapper/system/platform/UserInfoMapper.xml

@@ -0,0 +1,22 @@
+<?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.ruoyi.system.mapper.UserInfoMapper">
+    
+    <resultMap type="UserInfo" id="UserInfoResult">
+        <result property="id"    column="id"    />
+        <result property="userPhone"    column="user_phone"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectTUserInfoVo">
+        select id, user_phone, del_flag, create_by, create_time, update_by, update_time from t_user_info
+    </sql>
+
+
+</mapper>