diff --git a/gan-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteLogService.java b/gan-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteLogService.java
index c348387..5c8a9c4 100644
--- a/gan-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteLogService.java
+++ b/gan-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/RemoteLogService.java
@@ -24,6 +24,181 @@ public interface RemoteLogService
*
* @param sysOperLog 日志实体
* @param source 请求来源
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
* @return 结果
*/
@PostMapping("/operlog")
diff --git a/gan-modules/ruoyi-gan/pom.xml b/gan-modules/ruoyi-gan/pom.xml
index 73885e7..4bb078e 100644
--- a/gan-modules/ruoyi-gan/pom.xml
+++ b/gan-modules/ruoyi-gan/pom.xml
@@ -92,6 +92,11 @@
com.aliyun
aliyun-java-sdk-dysmsapi
+
+ com.aliyun.oss
+ aliyun-sdk-oss
+ 3.10.2
+
com.github.xiaoymin
@@ -106,11 +111,7 @@
org.projectlombok
lombok
-
- com.aliyun.oss
- aliyun-sdk-oss
- 3.10.2
-
+
diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppAreaController.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppAreaController.java
new file mode 100644
index 0000000..840dacc
--- /dev/null
+++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppAreaController.java
@@ -0,0 +1,95 @@
+package com.ruoyi.app.controller;
+
+import com.ruoyi.app.service.IAppCityService;
+import com.ruoyi.app.service.IAppProvinceService;
+import com.ruoyi.app.service.IAppTownService;
+import com.ruoyi.app.service.impl.AppProvinceServiceImpl;
+import com.ruoyi.common.core.web.controller.BaseController;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import io.swagger.annotations.Api;
+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.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+
+@RestController
+@RequestMapping("/area")
+@Api(tags = "省市区接口" , description = "省市区接口")
+public class AppAreaController extends BaseController {
+
+
+ @Autowired
+ private IAppProvinceService appProvinceService;
+
+ @Autowired
+ private IAppCityService appCityService;
+
+ @Autowired
+ private IAppTownService appTownService;
+
+
+ /**
+ * 所有省级数据
+ * @return
+ */
+ @GetMapping("/getAllProvince")
+ @ApiOperation(value = "所有省级数据", notes = "所有省级数据", httpMethod = "GET")
+ public AjaxResult getAllProvince() {
+ return AjaxResult.success(appProvinceService.selectAppProvinceList(null));
+ }
+
+
+ /**
+ * 所有市级数据
+ * @return
+ */
+ @GetMapping("/getAllCity")
+ @ApiOperation(value = "所有市级数据", notes = "所有市级数据", httpMethod = "GET")
+ public AjaxResult getAllCity() {
+ return AjaxResult.success(appCityService.selectAppCityList(null));
+ }
+
+ /**
+ * 所有县级数据
+ * @return
+ */
+ @GetMapping("/getAllTown")
+ @ApiOperation(value = "所有县级数据", notes = "所有县级数据", httpMethod = "GET")
+ public AjaxResult getAllTown() {
+ return AjaxResult.success(appTownService.selectAppTownList(null));
+ }
+
+ /**
+ * 根据省级地查询城市
+ */
+ @GetMapping("/getCityByProvinceId")
+ @ApiOperation(value = "根据省级id查询城市", notes = "根据省级id查询城市", httpMethod = "GET")
+ public AjaxResult getCityByProvinceId(@RequestParam("provinceId") Integer provinceId) {
+ return AjaxResult.success(appCityService.selectAppCityListByProvinceId(provinceId));
+
+ }
+
+ /**
+ * 根据省级地查询城市
+ */
+ @GetMapping("/getTownByCityId")
+ @ApiOperation(value = "根据省级id查询城市", notes = "根据省级id查询城市", httpMethod = "GET")
+ public AjaxResult getTownByCityId(@RequestParam("cityId") Integer cityId) {
+ return AjaxResult.success(appTownService.getTownByCityId(cityId));
+
+ }
+
+ /**
+ * 省市区树状结构返回
+ */
+ @GetMapping("/getAreaTree")
+ @ApiOperation(value = "省市区树状结构", notes = "省市区树状结构", httpMethod = "GET")
+ public AjaxResult getAreaTree() {
+
+ return AjaxResult.success(appProvinceService.selectAppProvinceTree());
+ }
+
+}
diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppLoginController.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppLoginController.java
index 519cc28..769cf24 100644
--- a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppLoginController.java
+++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppLoginController.java
@@ -8,6 +8,7 @@ import com.ruoyi.app.form.RegisterForm;
import com.ruoyi.app.service.IAppRegisterService;
import com.ruoyi.app.service.IAppUserService;
import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.core.utils.ip.IpUtils;
import com.ruoyi.common.core.utils.uuid.IdUtils;
import com.ruoyi.common.redis.service.RedisService;
@@ -49,6 +50,9 @@ public class AppLoginController {
AppUser appUser = appUserService.selectAppUserByPhone(registerForm.getPhoneNumber());
Assert.notNull(registerForm.getSchoolId(), "学校id不能为空");
Assert.isNull(appUser, "手机号已注册");
+ if (StringUtils.isNotEmpty(registerForm.getEmail())) {
+
+ }
AppRegister appRegister = setAppRegister(registerForm);
appRegister.setInvitationCode(registerForm.getInvitationCode());
int i = appRegisterService.insertAppRegister(appRegister);
diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppCity.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppCity.java
new file mode 100644
index 0000000..a5021f3
--- /dev/null
+++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppCity.java
@@ -0,0 +1,65 @@
+package com.ruoyi.app.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.core.annotation.Excel;
+import com.ruoyi.common.core.web.domain.BaseEntity;
+
+/**
+ * 城市数据对象 app_city
+ *
+ * @author wyh
+ * @date 2024-04-24
+ */
+public class AppCity extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 城市id */
+ private Integer id;
+
+ /** 城市名称 */
+ @Excel(name = "城市名称")
+ private String name;
+
+ /** 所属城市编号 */
+ @Excel(name = "所属城市编号")
+ private Long provinceId;
+
+ public void setId(Integer id)
+ {
+ this.id = id;
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+ public void setProvinceId(Long provinceId)
+ {
+ this.provinceId = provinceId;
+ }
+
+ public Long getProvinceId()
+ {
+ return provinceId;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("id", getId())
+ .append("name", getName())
+ .append("provinceId", getProvinceId())
+ .toString();
+ }
+}
diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppProvince.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppProvince.java
new file mode 100644
index 0000000..8d32125
--- /dev/null
+++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppProvince.java
@@ -0,0 +1,65 @@
+package com.ruoyi.app.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.core.annotation.Excel;
+import com.ruoyi.common.core.web.domain.BaseEntity;
+
+/**
+ * 省数据对象 app_province
+ *
+ * @author wyh
+ * @date 2024-04-24
+ */
+public class AppProvince extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 省级id */
+ private Integer id;
+
+ /** 省名 */
+ @Excel(name = "省名")
+ private String name;
+
+ /** 所属地区 */
+ @Excel(name = "所属地区")
+ private String area;
+
+ public void setId(Integer id)
+ {
+ this.id = id;
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+ public void setArea(String area)
+ {
+ this.area = area;
+ }
+
+ public String getArea()
+ {
+ return area;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("id", getId())
+ .append("name", getName())
+ .append("area", getArea())
+ .toString();
+ }
+}
diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppTown.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppTown.java
new file mode 100644
index 0000000..2959bd0
--- /dev/null
+++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppTown.java
@@ -0,0 +1,65 @@
+package com.ruoyi.app.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.core.annotation.Excel;
+import com.ruoyi.common.core.web.domain.BaseEntity;
+
+/**
+ * 区数据对象 app_town
+ *
+ * @author wyh
+ * @date 2024-04-24
+ */
+public class AppTown extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 区id */
+ private Integer id;
+
+ /** 区名称 */
+ @Excel(name = "区名称")
+ private String name;
+
+ /** 所属城市编号 */
+ @Excel(name = "所属城市编号")
+ private Long cityId;
+
+ public void setId(Integer id)
+ {
+ this.id = id;
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+ public void setCityId(Long cityId)
+ {
+ this.cityId = cityId;
+ }
+
+ public Long getCityId()
+ {
+ return cityId;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("id", getId())
+ .append("name", getName())
+ .append("cityId", getCityId())
+ .toString();
+ }
+}
diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/vo/AreaVo.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/vo/AreaVo.java
new file mode 100644
index 0000000..e6f9f41
--- /dev/null
+++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/vo/AreaVo.java
@@ -0,0 +1,16 @@
+package com.ruoyi.app.domain.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class AreaVo {
+ private Integer id;
+ private String name;
+ private String parentId;
+ private Integer level;
+ private Boolean isLeaf;
+ private List children;
+}
+
diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppCityMapper.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppCityMapper.java
new file mode 100644
index 0000000..9243b9a
--- /dev/null
+++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppCityMapper.java
@@ -0,0 +1,64 @@
+package com.ruoyi.app.mapper;
+
+import java.util.List;
+import com.ruoyi.app.domain.AppCity;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 城市数据Mapper接口
+ *
+ * @author wyh
+ * @date 2024-04-24
+ */
+public interface AppCityMapper
+{
+ /**
+ * 查询城市数据
+ *
+ * @param id 城市数据主键
+ * @return 城市数据
+ */
+ public AppCity selectAppCityById(Long id);
+
+ /**
+ * 查询城市数据列表
+ *
+ * @param appCity 城市数据
+ * @return 城市数据集合
+ */
+ public List selectAppCityList(AppCity appCity);
+
+ /**
+ * 新增城市数据
+ *
+ * @param appCity 城市数据
+ * @return 结果
+ */
+ public int insertAppCity(AppCity appCity);
+
+ /**
+ * 修改城市数据
+ *
+ * @param appCity 城市数据
+ * @return 结果
+ */
+ public int updateAppCity(AppCity appCity);
+
+ /**
+ * 删除城市数据
+ *
+ * @param id 城市数据主键
+ * @return 结果
+ */
+ public int deleteAppCityById(Long id);
+
+ /**
+ * 批量删除城市数据
+ *
+ * @param ids 需要删除的数据主键集合
+ * @return 结果
+ */
+ public int deleteAppCityByIds(Long[] ids);
+
+ List selectAppCityListByProvinceId(@Param("provinceId") Integer provinceId);
+}
diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppProvinceMapper.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppProvinceMapper.java
new file mode 100644
index 0000000..fddffcb
--- /dev/null
+++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppProvinceMapper.java
@@ -0,0 +1,61 @@
+package com.ruoyi.app.mapper;
+
+import java.util.List;
+import com.ruoyi.app.domain.AppProvince;
+
+/**
+ * 省数据Mapper接口
+ *
+ * @author wyh
+ * @date 2024-04-24
+ */
+public interface AppProvinceMapper
+{
+ /**
+ * 查询省数据
+ *
+ * @param id 省数据主键
+ * @return 省数据
+ */
+ public AppProvince selectAppProvinceById(Integer id);
+
+ /**
+ * 查询省数据列表
+ *
+ * @param appProvince 省数据
+ * @return 省数据集合
+ */
+ public List selectAppProvinceList(AppProvince appProvince);
+
+ /**
+ * 新增省数据
+ *
+ * @param appProvince 省数据
+ * @return 结果
+ */
+ public int insertAppProvince(AppProvince appProvince);
+
+ /**
+ * 修改省数据
+ *
+ * @param appProvince 省数据
+ * @return 结果
+ */
+ public int updateAppProvince(AppProvince appProvince);
+
+ /**
+ * 删除省数据
+ *
+ * @param id 省数据主键
+ * @return 结果
+ */
+ public int deleteAppProvinceById(Integer id);
+
+ /**
+ * 批量删除省数据
+ *
+ * @param ids 需要删除的数据主键集合
+ * @return 结果
+ */
+ public int deleteAppProvinceByIds(Integer[] ids);
+}
diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppTownMapper.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppTownMapper.java
new file mode 100644
index 0000000..9d08018
--- /dev/null
+++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppTownMapper.java
@@ -0,0 +1,64 @@
+package com.ruoyi.app.mapper;
+
+import java.util.List;
+import com.ruoyi.app.domain.AppTown;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 区数据Mapper接口
+ *
+ * @author wyh
+ * @date 2024-04-24
+ */
+public interface AppTownMapper
+{
+ /**
+ * 查询区数据
+ *
+ * @param id 区数据主键
+ * @return 区数据
+ */
+ public AppTown selectAppTownById(Long id);
+
+ /**
+ * 查询区数据列表
+ *
+ * @param appTown 区数据
+ * @return 区数据集合
+ */
+ public List selectAppTownList(AppTown appTown);
+
+ /**
+ * 新增区数据
+ *
+ * @param appTown 区数据
+ * @return 结果
+ */
+ public int insertAppTown(AppTown appTown);
+
+ /**
+ * 修改区数据
+ *
+ * @param appTown 区数据
+ * @return 结果
+ */
+ public int updateAppTown(AppTown appTown);
+
+ /**
+ * 删除区数据
+ *
+ * @param id 区数据主键
+ * @return 结果
+ */
+ public int deleteAppTownById(Long id);
+
+ /**
+ * 批量删除区数据
+ *
+ * @param ids 需要删除的数据主键集合
+ * @return 结果
+ */
+ public int deleteAppTownByIds(Long[] ids);
+
+ List getTownByCityId(@Param("cityId") Integer cityId);
+}
diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppCityService.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppCityService.java
new file mode 100644
index 0000000..2794763
--- /dev/null
+++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppCityService.java
@@ -0,0 +1,63 @@
+package com.ruoyi.app.service;
+
+import java.util.List;
+import com.ruoyi.app.domain.AppCity;
+
+/**
+ * 城市数据Service接口
+ *
+ * @author wyh
+ * @date 2024-04-24
+ */
+public interface IAppCityService
+{
+ /**
+ * 查询城市数据
+ *
+ * @param id 城市数据主键
+ * @return 城市数据
+ */
+ public AppCity selectAppCityById(Long id);
+
+ /**
+ * 查询城市数据列表
+ *
+ * @param appCity 城市数据
+ * @return 城市数据集合
+ */
+ public List selectAppCityList(AppCity appCity);
+
+ /**
+ * 新增城市数据
+ *
+ * @param appCity 城市数据
+ * @return 结果
+ */
+ public int insertAppCity(AppCity appCity);
+
+ /**
+ * 修改城市数据
+ *
+ * @param appCity 城市数据
+ * @return 结果
+ */
+ public int updateAppCity(AppCity appCity);
+
+ /**
+ * 批量删除城市数据
+ *
+ * @param ids 需要删除的城市数据主键集合
+ * @return 结果
+ */
+ public int deleteAppCityByIds(Long[] ids);
+
+ /**
+ * 删除城市数据信息
+ *
+ * @param id 城市数据主键
+ * @return 结果
+ */
+ public int deleteAppCityById(Long id);
+
+ List selectAppCityListByProvinceId(Integer provinceId);
+}
diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppProvinceService.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppProvinceService.java
new file mode 100644
index 0000000..1d11bfb
--- /dev/null
+++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppProvinceService.java
@@ -0,0 +1,64 @@
+package com.ruoyi.app.service;
+
+import java.util.List;
+import com.ruoyi.app.domain.AppProvince;
+import com.ruoyi.app.domain.vo.AreaVo;
+
+/**
+ * 省数据Service接口
+ *
+ * @author wyh
+ * @date 2024-04-24
+ */
+public interface IAppProvinceService
+{
+ /**
+ * 查询省数据
+ *
+ * @param id 省数据主键
+ * @return 省数据
+ */
+ public AppProvince selectAppProvinceById(Integer id);
+
+ /**
+ * 查询省数据列表
+ *
+ * @param appProvince 省数据
+ * @return 省数据集合
+ */
+ public List selectAppProvinceList(AppProvince appProvince);
+
+ /**
+ * 新增省数据
+ *
+ * @param appProvince 省数据
+ * @return 结果
+ */
+ public int insertAppProvince(AppProvince appProvince);
+
+ /**
+ * 修改省数据
+ *
+ * @param appProvince 省数据
+ * @return 结果
+ */
+ public int updateAppProvince(AppProvince appProvince);
+
+ /**
+ * 批量删除省数据
+ *
+ * @param ids 需要删除的省数据主键集合
+ * @return 结果
+ */
+ public int deleteAppProvinceByIds(Integer[] ids);
+
+ /**
+ * 删除省数据信息
+ *
+ * @param id 省数据主键
+ * @return 结果
+ */
+ public int deleteAppProvinceById(Integer id);
+
+ List selectAppProvinceTree();
+}
diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppTownService.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppTownService.java
new file mode 100644
index 0000000..8bfb593
--- /dev/null
+++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppTownService.java
@@ -0,0 +1,63 @@
+package com.ruoyi.app.service;
+
+import java.util.List;
+import com.ruoyi.app.domain.AppTown;
+
+/**
+ * 区数据Service接口
+ *
+ * @author wyh
+ * @date 2024-04-24
+ */
+public interface IAppTownService
+{
+ /**
+ * 查询区数据
+ *
+ * @param id 区数据主键
+ * @return 区数据
+ */
+ public AppTown selectAppTownById(Long id);
+
+ /**
+ * 查询区数据列表
+ *
+ * @param appTown 区数据
+ * @return 区数据集合
+ */
+ public List selectAppTownList(AppTown appTown);
+
+ /**
+ * 新增区数据
+ *
+ * @param appTown 区数据
+ * @return 结果
+ */
+ public int insertAppTown(AppTown appTown);
+
+ /**
+ * 修改区数据
+ *
+ * @param appTown 区数据
+ * @return 结果
+ */
+ public int updateAppTown(AppTown appTown);
+
+ /**
+ * 批量删除区数据
+ *
+ * @param ids 需要删除的区数据主键集合
+ * @return 结果
+ */
+ public int deleteAppTownByIds(Long[] ids);
+
+ /**
+ * 删除区数据信息
+ *
+ * @param id 区数据主键
+ * @return 结果
+ */
+ public int deleteAppTownById(Long id);
+
+ List getTownByCityId(Integer cityId);
+}
diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppCityServiceImpl.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppCityServiceImpl.java
new file mode 100644
index 0000000..3d5f082
--- /dev/null
+++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppCityServiceImpl.java
@@ -0,0 +1,99 @@
+package com.ruoyi.app.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.app.mapper.AppCityMapper;
+import com.ruoyi.app.domain.AppCity;
+import com.ruoyi.app.service.IAppCityService;
+
+/**
+ * 城市数据Service业务层处理
+ *
+ * @author wyh
+ * @date 2024-04-24
+ */
+@Service
+public class AppCityServiceImpl implements IAppCityService
+{
+ @Autowired
+ private AppCityMapper appCityMapper;
+
+ /**
+ * 查询城市数据
+ *
+ * @param id 城市数据主键
+ * @return 城市数据
+ */
+ @Override
+ public AppCity selectAppCityById(Long id)
+ {
+ return appCityMapper.selectAppCityById(id);
+ }
+
+ /**
+ * 查询城市数据列表
+ *
+ * @param appCity 城市数据
+ * @return 城市数据
+ */
+ @Override
+ public List selectAppCityList(AppCity appCity)
+ {
+ return appCityMapper.selectAppCityList(appCity);
+ }
+
+ /**
+ * 新增城市数据
+ *
+ * @param appCity 城市数据
+ * @return 结果
+ */
+ @Override
+ public int insertAppCity(AppCity appCity)
+ {
+ return appCityMapper.insertAppCity(appCity);
+ }
+
+ /**
+ * 修改城市数据
+ *
+ * @param appCity 城市数据
+ * @return 结果
+ */
+ @Override
+ public int updateAppCity(AppCity appCity)
+ {
+ return appCityMapper.updateAppCity(appCity);
+ }
+
+ /**
+ * 批量删除城市数据
+ *
+ * @param ids 需要删除的城市数据主键
+ * @return 结果
+ */
+ @Override
+ public int deleteAppCityByIds(Long[] ids)
+ {
+ return appCityMapper.deleteAppCityByIds(ids);
+ }
+
+ /**
+ * 删除城市数据信息
+ *
+ * @param id 城市数据主键
+ * @return 结果
+ */
+ @Override
+ public int deleteAppCityById(Long id)
+ {
+ return appCityMapper.deleteAppCityById(id);
+ }
+
+ @Override
+ public List selectAppCityListByProvinceId(Integer provinceId) {
+
+ return appCityMapper.selectAppCityListByProvinceId(provinceId);
+ }
+}
diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppProvinceServiceImpl.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppProvinceServiceImpl.java
new file mode 100644
index 0000000..3d4f4ca
--- /dev/null
+++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppProvinceServiceImpl.java
@@ -0,0 +1,156 @@
+package com.ruoyi.app.service.impl;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import com.ruoyi.app.domain.AppCity;
+import com.ruoyi.app.domain.AppTown;
+import com.ruoyi.app.domain.vo.AreaVo;
+import com.ruoyi.app.mapper.AppCityMapper;
+import com.ruoyi.app.mapper.AppTownMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.app.mapper.AppProvinceMapper;
+import com.ruoyi.app.domain.AppProvince;
+import com.ruoyi.app.service.IAppProvinceService;
+
+/**
+ * 省数据Service业务层处理
+ *
+ * @author wyh
+ * @date 2024-04-24
+ */
+@Service
+public class AppProvinceServiceImpl implements IAppProvinceService {
+ @Autowired
+ private AppProvinceMapper appProvinceMapper;
+
+ @Autowired
+ private AppCityMapper appCityMapper;
+
+ @Autowired
+ private AppTownMapper appTownMapper;
+
+ /**
+ * 查询省数据
+ *
+ * @param id 省数据主键
+ * @return 省数据
+ */
+ @Override
+ public AppProvince selectAppProvinceById(Integer id) {
+ return appProvinceMapper.selectAppProvinceById(id);
+ }
+
+ /**
+ * 查询省数据列表
+ *
+ * @param appProvince 省数据
+ * @return 省数据
+ */
+ @Override
+ public List selectAppProvinceList(AppProvince appProvince) {
+ return appProvinceMapper.selectAppProvinceList(appProvince);
+ }
+
+ /**
+ * 新增省数据
+ *
+ * @param appProvince 省数据
+ * @return 结果
+ */
+ @Override
+ public int insertAppProvince(AppProvince appProvince) {
+ return appProvinceMapper.insertAppProvince(appProvince);
+ }
+
+ /**
+ * 修改省数据
+ *
+ * @param appProvince 省数据
+ * @return 结果
+ */
+ @Override
+ public int updateAppProvince(AppProvince appProvince) {
+ return appProvinceMapper.updateAppProvince(appProvince);
+ }
+
+ /**
+ * 批量删除省数据
+ *
+ * @param ids 需要删除的省数据主键
+ * @return 结果
+ */
+ @Override
+ public int deleteAppProvinceByIds(Integer[] ids) {
+ return appProvinceMapper.deleteAppProvinceByIds(ids);
+ }
+
+ /**
+ * 删除省数据信息
+ *
+ * @param id 省数据主键
+ * @return 结果
+ */
+ @Override
+ public int deleteAppProvinceById(Integer id) {
+ return appProvinceMapper.deleteAppProvinceById(id);
+ }
+
+ @Override
+ public List selectAppProvinceTree() {
+ // 查询所有省级列表
+ List appProvinces = appProvinceMapper.selectAppProvinceList(null);
+
+ return appProvinces.stream()
+ .map(appProvince -> {
+ AreaVo areaVo = new AreaVo();
+ areaVo.setId(appProvince.getId());
+ areaVo.setName(appProvince.getName());
+ areaVo.setLevel(1);
+ areaVo.setIsLeaf(false);
+
+ List appCities = appCityMapper.selectAppCityListByProvinceId(appProvince.getId());
+ if (appCities == null || appCities.isEmpty()) {
+ return areaVo;
+ }
+
+ List children = appCities.stream()
+ .map(appCity -> {
+ AreaVo child = new AreaVo();
+ child.setId(appCity.getId());
+ child.setName(appCity.getName());
+ child.setLevel(2);
+ child.setIsLeaf(false);
+
+ List appTowns = appTownMapper.getTownByCityId(appCity.getId());
+ if (appTowns == null || appTowns.isEmpty()) {
+ return child;
+ }
+
+ List townChildren = appTowns.stream()
+ .map(appTown -> {
+ AreaVo townChild = new AreaVo();
+ townChild.setId(appTown.getId());
+ townChild.setName(appTown.getName());
+ townChild.setLevel(3);
+ townChild.setIsLeaf(true);
+ return townChild;
+ })
+ .collect(Collectors.toList());
+
+ child.setChildren(townChildren);
+ return child;
+ })
+ .collect(Collectors.toList());
+
+ areaVo.setChildren(children);
+ return areaVo;
+ })
+ .collect(Collectors.toList());
+ }
+
+}
diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppTownServiceImpl.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppTownServiceImpl.java
new file mode 100644
index 0000000..6dae78e
--- /dev/null
+++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppTownServiceImpl.java
@@ -0,0 +1,99 @@
+package com.ruoyi.app.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.app.mapper.AppTownMapper;
+import com.ruoyi.app.domain.AppTown;
+import com.ruoyi.app.service.IAppTownService;
+
+/**
+ * 区数据Service业务层处理
+ *
+ * @author wyh
+ * @date 2024-04-24
+ */
+@Service
+public class AppTownServiceImpl implements IAppTownService
+{
+ @Autowired
+ private AppTownMapper appTownMapper;
+
+ /**
+ * 查询区数据
+ *
+ * @param id 区数据主键
+ * @return 区数据
+ */
+ @Override
+ public AppTown selectAppTownById(Long id)
+ {
+ return appTownMapper.selectAppTownById(id);
+ }
+
+ /**
+ * 查询区数据列表
+ *
+ * @param appTown 区数据
+ * @return 区数据
+ */
+ @Override
+ public List selectAppTownList(AppTown appTown)
+ {
+ return appTownMapper.selectAppTownList(appTown);
+ }
+
+ /**
+ * 新增区数据
+ *
+ * @param appTown 区数据
+ * @return 结果
+ */
+ @Override
+ public int insertAppTown(AppTown appTown)
+ {
+ return appTownMapper.insertAppTown(appTown);
+ }
+
+ /**
+ * 修改区数据
+ *
+ * @param appTown 区数据
+ * @return 结果
+ */
+ @Override
+ public int updateAppTown(AppTown appTown)
+ {
+ return appTownMapper.updateAppTown(appTown);
+ }
+
+ /**
+ * 批量删除区数据
+ *
+ * @param ids 需要删除的区数据主键
+ * @return 结果
+ */
+ @Override
+ public int deleteAppTownByIds(Long[] ids)
+ {
+ return appTownMapper.deleteAppTownByIds(ids);
+ }
+
+ /**
+ * 删除区数据信息
+ *
+ * @param id 区数据主键
+ * @return 结果
+ */
+ @Override
+ public int deleteAppTownById(Long id)
+ {
+ return appTownMapper.deleteAppTownById(id);
+ }
+
+ @Override
+ public List getTownByCityId(Integer cityId) {
+
+ return appTownMapper.getTownByCityId(cityId);
+ }
+}
diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/utils/aliyun/sms/SendNoteUtil.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/utils/aliyun/sms/SendNoteUtil.java
index a1e7f72..ef4a95e 100644
--- a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/utils/aliyun/sms/SendNoteUtil.java
+++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/utils/aliyun/sms/SendNoteUtil.java
@@ -124,4 +124,14 @@ public class SendNoteUtil {
}
+ /**
+ * 邮件推送
+ *
+ *
+ */
+// public void sendEmail() {
+// SingleSendMailRequest request = new SingleSendMailRequest();
+// }
+
+
}
\ No newline at end of file
diff --git a/gan-modules/ruoyi-gan/src/main/resources/logback.xml b/gan-modules/ruoyi-gan/src/main/resources/logback.xml
index 96bc0bb..2472627 100644
--- a/gan-modules/ruoyi-gan/src/main/resources/logback.xml
+++ b/gan-modules/ruoyi-gan/src/main/resources/logback.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppCityMapper.xml b/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppCityMapper.xml
new file mode 100644
index 0000000..fc1d367
--- /dev/null
+++ b/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppCityMapper.xml
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+ select id, name, province_id from app_city
+
+
+
+
+
+
+
+ insert into app_city
+
+ name,
+ province_id,
+
+
+ #{name},
+ #{provinceId},
+
+
+
+
+ update app_city
+
+ name = #{name},
+ province_id = #{provinceId},
+
+ where id = #{id}
+
+
+
+ delete from app_city where id = #{id}
+
+
+
+ delete from app_city where id in
+
+ #{id}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppProvinceMapper.xml b/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppProvinceMapper.xml
new file mode 100644
index 0000000..c7fbe61
--- /dev/null
+++ b/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppProvinceMapper.xml
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+
+
+
+ select id, name, area from app_province
+
+
+
+
+
+
+
+ insert into app_province
+
+ name,
+ area,
+
+
+ #{name},
+ #{area},
+
+
+
+
+ update app_province
+
+ name = #{name},
+ area = #{area},
+
+ where id = #{id}
+
+
+
+ delete from app_province where id = #{id}
+
+
+
+ delete from app_province where id in
+
+ #{id}
+
+
+
\ No newline at end of file
diff --git a/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppTownMapper.xml b/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppTownMapper.xml
new file mode 100644
index 0000000..4baa2f2
--- /dev/null
+++ b/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppTownMapper.xml
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+ select id, name, city_id from app_town
+
+
+
+
+
+
+
+ insert into app_town
+
+ id,
+ name,
+ city_id,
+
+
+ #{id},
+ #{name},
+ #{cityId},
+
+
+
+
+ update app_town
+
+ name = #{name},
+ city_id = #{cityId},
+
+ where id = #{id}
+
+
+
+ delete from app_town where id = #{id}
+
+
+
+ delete from app_town where id in
+
+ #{id}
+
+
+
+
+
\ No newline at end of file
diff --git a/gan-modules/ruoyi-gen/src/main/resources/vm/java/controller.java.vm b/gan-modules/ruoyi-gen/src/main/resources/vm/java/controller.java.vm
index 363979b..386f820 100644
--- a/gan-modules/ruoyi-gen/src/main/resources/vm/java/controller.java.vm
+++ b/gan-modules/ruoyi-gen/src/main/resources/vm/java/controller.java.vm
@@ -3,6 +3,8 @@ package ${packageName}.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.common.core.domain.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -33,6 +35,7 @@ import com.ruoyi.common.core.web.page.TableDataInfo;
*/
@RestController
@RequestMapping("/${businessName}")
+@Api(tags = "${functionName}" , description = "${functionName}")
public class ${ClassName}Controller extends BaseController
{
@Autowired
@@ -43,6 +46,7 @@ public class ${ClassName}Controller extends BaseController
*/
@RequiresPermissions("${permissionPrefix}:list")
@GetMapping("/list")
+ @ApiOperation(value = "查询${functionName}", notes = "查询${functionName}", httpMethod = "GET")
#if($table.crud || $table.sub)
public TableDataInfo list(${ClassName} ${className})
{
@@ -76,6 +80,7 @@ public class ${ClassName}Controller extends BaseController
*/
@RequiresPermissions("${permissionPrefix}:query")
@GetMapping(value = "/{${pkColumn.javaField}}")
+ @ApiOperation(value = "获取${functionName}详细信息", notes = "获取${functionName}详细信息", httpMethod = "GET")
public AjaxResult getInfo(@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField})
{
return success(${className}Service.select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaField}));
@@ -85,8 +90,9 @@ public class ${ClassName}Controller extends BaseController
* 新增${functionName}
*/
@RequiresPermissions("${permissionPrefix}:add")
+ @ApiOperation(value = "新增${functionName}", notes = "新增${functionName}", httpMethod = "POST")
@Log(title = "${functionName}", businessType = BusinessType.INSERT)
- @PostMapping
+ @PostMapping("/add")
public AjaxResult add(@RequestBody ${ClassName} ${className})
{
return toAjax(${className}Service.insert${ClassName}(${className}));
@@ -96,8 +102,9 @@ public class ${ClassName}Controller extends BaseController
* 修改${functionName}
*/
@RequiresPermissions("${permissionPrefix}:edit")
+ @ApiOperation(value = "修改${functionName}", notes = "修改${functionName}", httpMethod = "PUT")
@Log(title = "${functionName}", businessType = BusinessType.UPDATE)
- @PutMapping
+ @PutMapping("/edit")
public AjaxResult edit(@RequestBody ${ClassName} ${className})
{
return toAjax(${className}Service.update${ClassName}(${className}));
@@ -109,7 +116,7 @@ public class ${ClassName}Controller extends BaseController
@RequiresPermissions("${permissionPrefix}:remove")
@Log(title = "${functionName}", businessType = BusinessType.DELETE)
@DeleteMapping("/{${pkColumn.javaField}s}")
- public AjaxResult remove(@PathVariable ${pkColumn.javaType}[] ${pkColumn.javaField}s)
+ public R remove(@PathVariable ${pkColumn.javaType}[] ${pkColumn.javaField}s)
{
return toAjax(${className}Service.delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaField}s));
}
diff --git a/gan-ui/src/views/app/register/index.vue b/gan-ui/src/views/app/register/index.vue
index 3ede343..683b3bc 100644
--- a/gan-ui/src/views/app/register/index.vue
+++ b/gan-ui/src/views/app/register/index.vue
@@ -123,7 +123,36 @@
-
+
+
+
+
+
+
+
+
+
+
{{ scope.row.sex == 0 ? '男' : scope.row.sex == 1 ? '女' : '' }}
@@ -239,7 +268,8 @@ export default {
form: {},
// 表单校验
rules: {
- }
+ },
+ logicImageList: []
};
},
created() {