@@ -0,0 +1,49 @@ | |||
package com.tuoheng.controller; | |||
import com.tuoheng.model.dto.City; | |||
import com.tuoheng.model.query.CityQuery; | |||
import com.tuoheng.service.CityService; | |||
import com.tuoheng.until.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; | |||
import java.util.List; | |||
/** | |||
* <p> | |||
* 高德城市表 前端控制器 | |||
* </p> | |||
* | |||
* @author 拓恒 | |||
* @since 2020-11-03 | |||
*/ | |||
@RestController | |||
@RequestMapping("/city") | |||
public class CityController{ | |||
@Autowired | |||
private CityService cityService; | |||
/** | |||
* 获取城市列表 | |||
* | |||
* @param cityQuery 查询条件 | |||
* @return | |||
*/ | |||
// @RequiresPermissions("sys:city:index") | |||
@GetMapping("/index") | |||
public JsonResult index(CityQuery cityQuery) { | |||
return cityService.getList(cityQuery); | |||
} | |||
/** | |||
* 查询行政区列表(树结构) | |||
* | |||
* @return 行政区列表(树结构) | |||
*/ | |||
@GetMapping("/queryCityList") | |||
public List<City> queryCityList() { | |||
return cityService.getCityList(); | |||
} | |||
} |
@@ -0,0 +1,20 @@ | |||
package com.tuoheng.mapper; | |||
import com.tuoheng.model.dto.City; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
import org.apache.ibatis.annotations.Mapper; | |||
/** | |||
* @author 小影 | |||
* @description 针对表【t_city(行政区划表)】的数据库操作Mapper | |||
* @createDate 2023-02-03 09:57:16 | |||
* @Entity com.tuoheng.model.dto.City | |||
*/ | |||
@Mapper | |||
public interface CityMapper extends BaseMapper<City> { | |||
} | |||
@@ -29,4 +29,7 @@ public interface TenantMapper { | |||
void updateById(TenantPo tenantPo); | |||
TenantPo selectById(Long id); | |||
@Select("select * from tuoheng_oidc.t_tenant where enabled =1") | |||
List<TTenant> selectList(); | |||
} |
@@ -0,0 +1,110 @@ | |||
package com.tuoheng.model.dto; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableField; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import java.io.Serializable; | |||
import java.util.Date; | |||
import java.util.List; | |||
import lombok.Data; | |||
/** | |||
* 行政区划表 | |||
* @TableName t_city | |||
*/ | |||
@TableName(value ="t_city") | |||
@Data | |||
public class City implements Serializable { | |||
/** | |||
* 编号 | |||
*/ | |||
@TableId(type = IdType.AUTO) | |||
private Integer id; | |||
/** | |||
* 父级编号 | |||
*/ | |||
private Integer pid; | |||
/** | |||
* 城市级别:1省 2市 3区 4街道 | |||
*/ | |||
private Integer level; | |||
/** | |||
* 城市名称 | |||
*/ | |||
private String name; | |||
/** | |||
* 城市编号(区号) | |||
*/ | |||
private String citycode; | |||
/** | |||
* 父级地理编号 | |||
*/ | |||
private String pAdcode; | |||
/** | |||
* 地理编号 | |||
*/ | |||
private String adcode; | |||
/** | |||
* 城市坐标中心点经度(* 1e6):如果是中国,此值是 1e7 | |||
*/ | |||
private Integer lng; | |||
/** | |||
* 城市坐标中心点纬度(* 1e6) | |||
*/ | |||
private Integer lat; | |||
/** | |||
* 排序号 | |||
*/ | |||
private Integer sort; | |||
/** | |||
* 添加人 | |||
*/ | |||
private Integer createUser; | |||
/** | |||
* 添加时间 | |||
*/ | |||
private Date createTime; | |||
/** | |||
* 更新人 | |||
*/ | |||
private Integer updateUser; | |||
/** | |||
* 更新时间 | |||
*/ | |||
private Date updateTime; | |||
/** | |||
* 有效标记 | |||
*/ | |||
private Integer mark; | |||
@TableField(exist = false) | |||
private static final long serialVersionUID = 1L; | |||
/** | |||
* 是否含有子级 | |||
*/ | |||
@TableField(exist = false) | |||
private boolean hasChildren; | |||
/** | |||
* 行政区 子集 | |||
*/ | |||
@TableField(exist = false) | |||
List<City> itemList; | |||
} |
@@ -33,4 +33,28 @@ public class OidcTenantDto { | |||
* 租户code | |||
*/ | |||
private String code; | |||
/** | |||
* 省级编码 | |||
*/ | |||
private String provinceCode; | |||
/** | |||
* 省份名称 | |||
*/ | |||
private String provinceName; | |||
/** | |||
*市区编号 | |||
*/ | |||
private String cityCode; | |||
/** | |||
* 市区名称 | |||
*/ | |||
private String cityName; | |||
/** | |||
* 区县编号 | |||
*/ | |||
private String districtCode; | |||
/** | |||
* 区县名称 | |||
*/ | |||
private String districtName; | |||
} |
@@ -62,6 +62,31 @@ public class TTenant implements Serializable { | |||
*/ | |||
private Integer enabled; | |||
/** | |||
* 省级编码 | |||
*/ | |||
private String provinceCode; | |||
/** | |||
* 省份名称 | |||
*/ | |||
private String provinceName; | |||
/** | |||
*市区编号 | |||
*/ | |||
private String cityCode; | |||
/** | |||
* 市区名称 | |||
*/ | |||
private String cityName; | |||
/** | |||
* 区县编号 | |||
*/ | |||
private String districtCode; | |||
/** | |||
* 区县名称 | |||
*/ | |||
private String districtName; | |||
@TableField(exist = false) | |||
private static final long serialVersionUID = 1L; | |||
} |
@@ -34,7 +34,7 @@ public class CreateClientUserDto { | |||
@NotNull(message = "clientRoleDtoList can not be null!") | |||
private List<ClientRoleDto> clientRoleDtoList; | |||
/** | |||
* 租户cod | |||
* 租户code | |||
*/ | |||
private String code; | |||
/** | |||
@@ -42,4 +42,30 @@ public class CreateClientUserDto { | |||
*/ | |||
private String name; | |||
/** | |||
* 省级编码 | |||
*/ | |||
private String provinceCode; | |||
/** | |||
* 省份名称 | |||
*/ | |||
private String provinceName; | |||
/** | |||
*市区编号 | |||
*/ | |||
private String cityCode; | |||
/** | |||
* 市区名称 | |||
*/ | |||
private String cityName; | |||
/** | |||
* 区县编号 | |||
*/ | |||
private String districtCode; | |||
/** | |||
* 区县名称 | |||
*/ | |||
private String districtName; | |||
} |
@@ -24,4 +24,28 @@ public class TenantPo extends BasePo { | |||
private String name; | |||
/** | |||
* 省级编码 | |||
*/ | |||
private String provinceCode; | |||
/** | |||
* 省份名称 | |||
*/ | |||
private String provinceName; | |||
/** | |||
*市区编号 | |||
*/ | |||
private String cityCode; | |||
/** | |||
* 市区名称 | |||
*/ | |||
private String cityName; | |||
/** | |||
* 区县编号 | |||
*/ | |||
private String districtCode; | |||
/** | |||
* 区县名称 | |||
*/ | |||
private String districtName; | |||
} |
@@ -0,0 +1,22 @@ | |||
package com.tuoheng.model.query; | |||
import com.tuoheng.common.BaseQuery; | |||
import lombok.Data; | |||
/** | |||
* 城市查询条件 | |||
*/ | |||
@Data | |||
public class CityQuery extends BaseQuery { | |||
/** | |||
* 城市名称 | |||
*/ | |||
private String name; | |||
/** | |||
* 父级ID | |||
*/ | |||
private Integer pid; | |||
} |
@@ -31,5 +31,29 @@ public class TenantVo { | |||
* 租户绑定的业务系统等 | |||
*/ | |||
private List<BusinessSystemVo> list; | |||
/** | |||
* 省级编码 | |||
*/ | |||
private String provinceCode; | |||
/** | |||
* 省份名称 | |||
*/ | |||
private String provinceName; | |||
/** | |||
*市区编号 | |||
*/ | |||
private String cityCode; | |||
/** | |||
* 市区名称 | |||
*/ | |||
private String cityName; | |||
/** | |||
* 区县编号 | |||
*/ | |||
private String districtCode; | |||
/** | |||
* 区县名称 | |||
*/ | |||
private String districtName; | |||
} |
@@ -0,0 +1,32 @@ | |||
package com.tuoheng.service; | |||
import com.tuoheng.common.BaseQuery; | |||
import com.tuoheng.model.dto.City; | |||
import com.baomidou.mybatisplus.extension.service.IService; | |||
import com.tuoheng.until.JsonResult; | |||
import java.util.List; | |||
/** | |||
* @author 小影 | |||
* @description 针对表【t_city(行政区划表)】的数据库操作Service | |||
* @createDate 2023-02-03 09:57:16 | |||
*/ | |||
public interface CityService extends IService<City> { | |||
/** | |||
* 获取行政区列表 | |||
* | |||
* @return 行政区列表 | |||
*/ | |||
List<City> getCityList(); | |||
/** | |||
* 根据查询条件获取数据列表 | |||
* | |||
* @param query 查询条件 | |||
* @return | |||
*/ | |||
JsonResult getList(BaseQuery query); | |||
} |
@@ -0,0 +1,101 @@ | |||
package com.tuoheng.service.impl; | |||
import cn.hutool.core.util.ObjectUtil; | |||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
import com.tuoheng.common.BaseQuery; | |||
import com.tuoheng.model.dto.City; | |||
import com.tuoheng.model.query.CityQuery; | |||
import com.tuoheng.service.CityService; | |||
import com.tuoheng.mapper.CityMapper; | |||
import com.tuoheng.until.JsonResult; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import java.util.Comparator; | |||
import java.util.List; | |||
import java.util.stream.Collectors; | |||
/** | |||
* @author 小影 | |||
* @description 针对表【t_city(行政区划表)】的数据库操作Service实现 | |||
* @createDate 2023-02-03 09:57:16 | |||
*/ | |||
@Service | |||
public class CityServiceImpl extends ServiceImpl<CityMapper, City> | |||
implements CityService{ | |||
@Autowired | |||
private CityMapper cityMapper; | |||
@Override | |||
public List<City> getCityList() { | |||
List<City> list = cityMapper.selectList(new LambdaQueryWrapper<City>() | |||
.eq(City::getMark, 1)); | |||
// 获取所有一级节点 | |||
List<City> result = list.stream(). | |||
filter(city -> city.getPid() == 0) | |||
.peek(city -> city.setItemList(getChildren(city, list))).sorted(Comparator.comparingInt(city -> (city.getSort() == null ? 0 : city.getSort()))) | |||
.collect(Collectors.toList()); | |||
return result; | |||
} | |||
/** | |||
* 递归获取有行政区的子集 | |||
* | |||
* @author zhu_zishuang | |||
* @date 3/13/21 | |||
*/ | |||
private List<City> getChildren(City rootCity, List<City> list) { | |||
return list.stream().filter(city -> | |||
city.getPid().equals(rootCity.getId()) | |||
).peek(city -> { | |||
// 设置子集 | |||
city.setItemList(getChildren(city, list)); | |||
}).sorted(Comparator.comparingInt(city -> (city.getSort() == null ? 0 : city.getSort()))).collect(Collectors.toList()); | |||
} | |||
/** | |||
* 获取城市列表 | |||
* | |||
* @param query 查询条件 | |||
* @return | |||
*/ | |||
@Override | |||
public JsonResult getList(BaseQuery query) { | |||
CityQuery cityQuery = (CityQuery) query; | |||
// 查询条件 | |||
QueryWrapper<City> queryWrapper = new QueryWrapper<>(); | |||
// 父级ID | |||
if (ObjectUtil.isNull(cityQuery.getPid())) { | |||
queryWrapper.eq("pid", 0); | |||
} else { | |||
queryWrapper.eq("pid", cityQuery.getPid()); | |||
} | |||
// 城市名称 | |||
if (!ObjectUtil.isEmpty(cityQuery.getName())) { | |||
queryWrapper.like("name", cityQuery.getName()); | |||
} | |||
queryWrapper.eq("mark", 1); | |||
queryWrapper.orderByAsc("sort"); | |||
// 查询分页数据 | |||
List<City> cityList = cityMapper.selectList(queryWrapper); | |||
cityList.forEach(item -> { | |||
//省、市、区、街道、村 | |||
if (item.getLevel() <= 4) { | |||
item.setHasChildren(true); | |||
} | |||
}); | |||
return JsonResult.success(cityList); | |||
} | |||
} | |||
@@ -109,6 +109,13 @@ public class ClientUserServiceImpl implements ClientUserSevice { | |||
//添加租户code | |||
tenantPo.setCode(createClientUserDto.getCode()); | |||
tenantPo.setName(createClientUserDto.getName()); | |||
tenantPo.setProvinceCode(createClientUserDto.getProvinceCode()); | |||
tenantPo.setProvinceName(createClientUserDto.getProvinceName()); | |||
tenantPo.setDistrictCode(createClientUserDto.getDistrictCode()); | |||
tenantPo.setDistrictName(createClientUserDto.getDistrictName()); | |||
tenantPo.setCityCode(createClientUserDto.getCityCode()); | |||
tenantPo.setCityName(createClientUserDto.getCityName()); | |||
log.debug("信息:" + tenantPo.toString()); | |||
tenantMapper.insertTenant(tenantPo); | |||
} | |||
} | |||
@@ -358,21 +365,27 @@ public class ClientUserServiceImpl implements ClientUserSevice { | |||
return jsonResult; | |||
} | |||
//TODO ->会导致循环终止(后期改进) | |||
requestAirport(dto, loginUser, CommonConstant.TWO); | |||
requestAirport(dto, loginUser, CommonConstant.TWO); | |||
} | |||
} else { | |||
JsonResult jsonResult = editResult(dto, dto.getClientId(), loginUser); | |||
if (!"操作成功".equals(jsonResult.getMsg())) { | |||
return jsonResult; | |||
} | |||
requestAirport(dto, loginUser, CommonConstant.TWO); | |||
requestAirport(dto, loginUser, CommonConstant.TWO); | |||
} | |||
TTenant tTenant = tenantMapper.getByCode(dto.getCode()); | |||
dto.setId(tTenant.getId()); | |||
TenantPo tenantPo = new TenantPo(); | |||
tenantPo.setName(dto.getName()) | |||
.setId(dto.getId()); | |||
.setId(dto.getId()) | |||
.setCityCode(dto.getCityCode()) | |||
.setCityName(dto.getCityName()) | |||
.setProvinceName(dto.getProvinceName()) | |||
.setProvinceCode(dto.getProvinceCode()) | |||
.setDistrictCode(dto.getDistrictCode()) | |||
.setDistrictName(dto.getDistrictName()); | |||
tenantMapper.updateById(tenantPo); | |||
//更新密码 | |||
if (ObjectUtil.isNotEmpty(dto.getPassword())) { | |||
@@ -545,7 +558,7 @@ public class ClientUserServiceImpl implements ClientUserSevice { | |||
resultRequestHeader.add("Authorization", "Bearer " + loginUser.getThToken()); | |||
HttpEntity httpEntity = new HttpEntity(request, resultRequestHeader); | |||
//设置地址(机场平台->配置文件) | |||
String url=""; | |||
String url = ""; | |||
switch (type) { | |||
case 1: | |||
url = CommonConfig.airportURL + AirportConstant.CREATE_TENANT; |
@@ -0,0 +1,32 @@ | |||
<?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.tuoheng.mapper.CityMapper"> | |||
<resultMap id="BaseResultMap" type="com.tuoheng.model.dto.City"> | |||
<id property="id" column="id" jdbcType="INTEGER"/> | |||
<result property="pid" column="pid" jdbcType="INTEGER"/> | |||
<result property="level" column="level" jdbcType="TINYINT"/> | |||
<result property="name" column="name" jdbcType="VARCHAR"/> | |||
<result property="citycode" column="citycode" jdbcType="VARCHAR"/> | |||
<result property="pAdcode" column="p_adcode" jdbcType="VARCHAR"/> | |||
<result property="adcode" column="adcode" jdbcType="VARCHAR"/> | |||
<result property="lng" column="lng" jdbcType="INTEGER"/> | |||
<result property="lat" column="lat" jdbcType="INTEGER"/> | |||
<result property="sort" column="sort" jdbcType="TINYINT"/> | |||
<result property="createUser" column="create_user" jdbcType="INTEGER"/> | |||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> | |||
<result property="updateUser" column="update_user" jdbcType="INTEGER"/> | |||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> | |||
<result property="mark" column="mark" jdbcType="TINYINT"/> | |||
</resultMap> | |||
<sql id="Base_Column_List"> | |||
id,pid,level, | |||
name,citycode,p_adcode, | |||
adcode,lng,lat, | |||
sort,create_user,create_time, | |||
update_user,update_time,mark | |||
</sql> | |||
</mapper> |
@@ -3,8 +3,8 @@ | |||
<mapper namespace="com.tuoheng.mapper.TenantMapper"> | |||
<insert id="insertTenant" parameterType="com.tuoheng.model.po.TenantPo" keyProperty="id" useGeneratedKeys="true"> | |||
INSERT INTO t_tenant (user_id, remark, `code`, `name`) | |||
VALUES (#{userId}, #{remark}, #{code}, #{name}) | |||
INSERT INTO t_tenant (user_id, remark, `code`, `name`,province_code,province_name,city_code,city_name,district_code,district_name) | |||
VALUES (#{userId}, #{remark}, #{code}, #{name},#{provinceCode},#{provinceName},#{cityCode},#{cityName},#{districtCode},#{districtName}) | |||
</insert> | |||
<update id="updateById" parameterType="com.tuoheng.model.po.TenantPo"> | |||
update t_tenant | |||
@@ -15,6 +15,24 @@ | |||
<if test="enabled != null"> | |||
enabled = #{enabled}, | |||
</if> | |||
<if test="provinceCode != null and provinceCode !=''"> | |||
province_code = #{provinceCode}, | |||
</if> | |||
<if test="provinceName != null and provinceName !=''"> | |||
province_name = #{provinceName}, | |||
</if> | |||
<if test="cityCode != null and cityCode !=''"> | |||
city_code = #{cityCode}, | |||
</if> | |||
<if test="cityName != null and cityName !=''"> | |||
city_name = #{cityName}, | |||
</if> | |||
<if test="districtCode != null and districtCode !=''"> | |||
district_code = #{districtCode}, | |||
</if> | |||
<if test="districtName != null and districtName !=''"> | |||
district_name = #{districtName}, | |||
</if> | |||
</set> | |||
where id = #{id} | |||
</update> | |||
@@ -24,7 +42,7 @@ | |||
where code = #{code} | |||
</select> | |||
<select id="findList" resultType="com.tuoheng.model.po.TenantPo"> | |||
SELECT id, user_id, remark,enabled, code, name | |||
SELECT id, user_id, remark,enabled, code, name,province_code,province_name,city_code,city_name,district_code,district_name | |||
FROM t_tenant | |||
WHERE enabled = 1 | |||
<if test="query.name != null and query.name != ''"> |
@@ -65,4 +65,8 @@ spring: | |||
max-active: 1000 # 连接池最大连接数(使用负值表示没有限制) | |||
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) | |||
max-idle: 10 # 连接池中的最大空闲连接 | |||
min-idle: 1 # 连接池中的最小空闲连接 | |||
min-idle: 1 # 连接池中的最小空闲连接 | |||
# 自定义配置 | |||
tuoheng: | |||
#airport配置地址 | |||
airport-url: https://airport-test.t-aaron.com |
@@ -65,4 +65,8 @@ spring: | |||
max-active: 1000 # 连接池最大连接数(使用负值表示没有限制) | |||
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) | |||
max-idle: 10 # 连接池中的最大空闲连接 | |||
min-idle: 1 # 连接池中的最小空闲连接 | |||
min-idle: 1 # 连接池中的最小空闲连接 | |||
# 自定义配置 | |||
tuoheng: | |||
#airport配置地址 | |||
airport-url: https://airport-test.t-aaron.com |
@@ -65,3 +65,7 @@ spring: | |||
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) | |||
max-idle: 10 # 连接池中的最大空闲连接 | |||
min-idle: 1 # 连接池中的最小空闲连接 | |||
# 自定义配置 | |||
tuoheng: | |||
#airport配置地址 | |||
airport-url: https://airport-test.t-aaron.com |
@@ -29,6 +29,13 @@ | |||
WHERE id = #{userId} | |||
and enabled = 1 | |||
</select> | |||
<select id="selectByTenantId" resultType="com.tuoheng.model.po.UserPo"> | |||
SELECT * | |||
FROM users | |||
WHERE tenant_id = #{tenantId} | |||
# 用户没有被删除 | |||
and enabled = 1 | |||
</select> | |||
<update id="updatePass" parameterType="com.tuoheng.model.po.UserPo"> | |||
update users |
@@ -0,0 +1,28 @@ | |||
<?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.tuoheng.mapper.Oauth2RegisteredClientMapper"> | |||
<resultMap id="BaseResultMap" type="com.tuoheng.model.dto.Oauth2RegisteredClient"> | |||
<id property="id" column="id" jdbcType="VARCHAR"/> | |||
<result property="clientId" column="client_id" jdbcType="VARCHAR"/> | |||
<result property="clientIdIssuedAt" column="client_id_issued_at" jdbcType="TIMESTAMP"/> | |||
<result property="clientSecret" column="client_secret" jdbcType="VARCHAR"/> | |||
<result property="clientSecretExpiresAt" column="client_secret_expires_at" jdbcType="TIMESTAMP"/> | |||
<result property="clientName" column="client_name" jdbcType="VARCHAR"/> | |||
<result property="clientAuthenticationMethods" column="client_authentication_methods" jdbcType="VARCHAR"/> | |||
<result property="authorizationGrantTypes" column="authorization_grant_types" jdbcType="VARCHAR"/> | |||
<result property="redirectUris" column="redirect_uris" jdbcType="VARCHAR"/> | |||
<result property="scopes" column="scopes" jdbcType="VARCHAR"/> | |||
<result property="clientSettings" column="client_settings" jdbcType="VARCHAR"/> | |||
<result property="tokenSettings" column="token_settings" jdbcType="VARCHAR"/> | |||
</resultMap> | |||
<sql id="Base_Column_List"> | |||
id,client_id,client_id_issued_at, | |||
client_secret,client_secret_expires_at,client_name, | |||
client_authentication_methods,authorization_grant_types,redirect_uris, | |||
scopes,client_settings,token_settings | |||
</sql> | |||
</mapper> |
@@ -3,18 +3,36 @@ | |||
<mapper namespace="com.tuoheng.mapper.TenantMapper"> | |||
<insert id="insertTenant" parameterType="com.tuoheng.model.po.TenantPo" keyProperty="id" useGeneratedKeys="true"> | |||
INSERT INTO t_tenant (user_id, remark, `code`, `name`) | |||
VALUES (#{userId}, #{remark}, #{code}, #{name}) | |||
INSERT INTO t_tenant (user_id, remark, `code`, `name`,province_code,province_name,city_code,city_name,district_code,district_name) | |||
VALUES (#{userId}, #{remark}, #{code}, #{name},#{provinceCode},#{provinceName},#{cityCode},#{cityName},#{districtCode},#{districtName}) | |||
</insert> | |||
<update id="updateById" parameterType="com.tuoheng.model.po.TenantPo"> | |||
update t_tenant | |||
<set> | |||
<if test="name !=null and name !=''"> | |||
<if test="name != null and name !=''"> | |||
name = #{name}, | |||
</if> | |||
<if test="enabled !=null"> | |||
<if test="enabled != null"> | |||
enabled = #{enabled}, | |||
</if> | |||
<if test="provinceCode != null and provinceCode !=''"> | |||
province_code = #{provinceCode}, | |||
</if> | |||
<if test="provinceName != null and provinceName !=''"> | |||
province_name = #{provinceName}, | |||
</if> | |||
<if test="cityCode != null and cityCode !=''"> | |||
city_code = #{cityCode}, | |||
</if> | |||
<if test="cityName != null and cityName !=''"> | |||
city_name = #{cityName}, | |||
</if> | |||
<if test="districtCode != null and districtCode !=''"> | |||
district_code = #{districtCode}, | |||
</if> | |||
<if test="districtName != null and districtName !=''"> | |||
district_name = #{districtName}, | |||
</if> | |||
</set> | |||
where id = #{id} | |||
</update> |
@@ -0,0 +1,3 @@ | |||
artifactId=tuoheng_oidc_admin | |||
groupId=com.tuoheng | |||
version=1.0.0 |
@@ -0,0 +1,59 @@ | |||
com\tuoheng\model\dto\Platform.class | |||
com\tuoheng\model\po\BasePo.class | |||
com\tuoheng\mapper\ClientUserMapper.class | |||
com\tuoheng\service\impl\PlatformServiceImpl.class | |||
com\tuoheng\config\http\HeadClientHttpRequestInterceptor.class | |||
com\tuoheng\model\dto\LoginUser.class | |||
com\tuoheng\TuohengOidcAdminApplication.class | |||
com\tuoheng\controller\PlatformController.class | |||
com\tuoheng\model\dto\ClientDto.class | |||
com\tuoheng\mapper\ClientMapper.class | |||
com\tuoheng\service\PlatformService.class | |||
com\tuoheng\service\impl\Oauth2RegisteredClientServiceImpl.class | |||
com\tuoheng\until\EncryptUtil.class | |||
com\tuoheng\model\param\UpdateUserPassDto.class | |||
com\tuoheng\model\dto\OidcTenantDto.class | |||
com\tuoheng\model\po\ClientUserRolePo.class | |||
com\tuoheng\until\JsonResult.class | |||
com\tuoheng\model\param\ClientRoleDto.class | |||
com\tuoheng\model\param\CreateClientTenantDto.class | |||
com\tuoheng\config\http\RestProperties.class | |||
com\tuoheng\common\ServiceException.class | |||
com\tuoheng\model\dto\ClientRoleInfoDto.class | |||
com\tuoheng\config\WebConfig.class | |||
com\tuoheng\controller\ClientController.class | |||
com\tuoheng\service\impl\ClientUserServiceImpl.class | |||
com\tuoheng\service\CurrentUser.class | |||
com\tuoheng\controller\UserController.class | |||
com\tuoheng\service\ClientSevice.class | |||
com\tuoheng\service\Oauth2RegisteredClientService.class | |||
com\tuoheng\until\RedisUtils.class | |||
com\tuoheng\mapper\Oauth2RegisteredClientMapper.class | |||
com\tuoheng\model\query\TenantQuery.class | |||
com\tuoheng\until\CryptoUtil.class | |||
com\tuoheng\model\param\GetClientTenantRoleDto.class | |||
com\tuoheng\mapper\PlatformMapper.class | |||
com\tuoheng\model\vo\BusinessSystemVo.class | |||
com\tuoheng\constant\HhzUrlConstant.class | |||
com\tuoheng\controller\DemoController.class | |||
com\tuoheng\common\ExceptionInterface.class | |||
com\tuoheng\model\po\UserPo.class | |||
com\tuoheng\model\param\CreateClientUserDto.class | |||
com\tuoheng\service\ClientUserSevice.class | |||
com\tuoheng\config\http\RestTemplateConfig.class | |||
com\tuoheng\config\http\RestTemplateConfig$1.class | |||
com\tuoheng\model\param\UpdateUserClientRoleDto.class | |||
com\tuoheng\model\dto\TTenant.class | |||
com\tuoheng\controller\TenantController.class | |||
com\tuoheng\mapper\AuthoritiesMapper.class | |||
com\tuoheng\service\impl\ClientServiceImpl.class | |||
com\tuoheng\model\po\AuthoritiesPo.class | |||
com\tuoheng\model\po\TenantPo.class | |||
com\tuoheng\model\dto\UserBaseInfoDto.class | |||
com\tuoheng\common\BaseQuery.class | |||
com\tuoheng\model\vo\TenantVo.class | |||
com\tuoheng\config\LoginUserHandler.class | |||
com\tuoheng\model\dto\Oauth2RegisteredClient.class | |||
com\tuoheng\mapper\ClientUserRoleMapper.class | |||
com\tuoheng\mapper\TenantMapper.class | |||
com\tuoheng\model\param\GetUserInfoDto.class |
@@ -0,0 +1,58 @@ | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\mapper\PlatformMapper.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\dto\TTenant.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\param\UpdateUserPassDto.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\query\TenantQuery.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\controller\UserController.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\dto\ClientRoleInfoDto.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\dto\Platform.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\vo\BusinessSystemVo.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\dto\OidcTenantDto.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\mapper\AuthoritiesMapper.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\param\GetClientTenantRoleDto.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\service\impl\ClientUserServiceImpl.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\service\Oauth2RegisteredClientService.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\mapper\ClientUserRoleMapper.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\service\impl\Oauth2RegisteredClientServiceImpl.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\mapper\ClientMapper.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\dto\ClientDto.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\common\BaseQuery.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\mapper\Oauth2RegisteredClientMapper.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\until\RedisUtils.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\vo\TenantVo.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\po\AuthoritiesPo.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\TuohengOidcAdminApplication.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\param\ClientRoleDto.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\until\EncryptUtil.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\po\UserPo.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\common\ServiceException.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\po\TenantPo.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\service\ClientSevice.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\po\ClientUserRolePo.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\config\http\RestTemplateConfig.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\po\BasePo.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\controller\PlatformController.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\controller\TenantController.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\service\CurrentUser.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\common\ExceptionInterface.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\service\PlatformService.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\config\WebConfig.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\config\http\RestProperties.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\param\GetUserInfoDto.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\config\http\HeadClientHttpRequestInterceptor.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\param\CreateClientUserDto.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\constant\HhzUrlConstant.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\param\CreateClientTenantDto.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\mapper\ClientUserMapper.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\dto\Oauth2RegisteredClient.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\param\UpdateUserClientRoleDto.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\service\impl\PlatformServiceImpl.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\until\CryptoUtil.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\service\ClientUserSevice.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\until\JsonResult.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\mapper\TenantMapper.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\dto\LoginUser.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\controller\ClientController.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\config\LoginUserHandler.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\model\dto\UserBaseInfoDto.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\service\impl\ClientServiceImpl.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_admin\src\main\java\com\tuoheng\controller\DemoController.java |
@@ -0,0 +1,3 @@ | |||
artifactId=tuoheng_oidc_server | |||
groupId=com.tuoheng | |||
version=1.0.0 |
@@ -0,0 +1,37 @@ | |||
com\tuoheng\controller\VerifyCodeController.class | |||
com\tuoheng\service\UserSevice.class | |||
com\tuoheng\model\dto\ClientRoleDto.class | |||
com\tuoheng\oauth2\authentication\OAuth2ResourceOwnerPasswordAuthenticationToken.class | |||
com\tuoheng\service\impl\OidcUserInfoServiceImpl.class | |||
com\tuoheng\until\JsonResult.class | |||
com\tuoheng\model\dto\JwtUser.class | |||
com\tuoheng\handler\AccessDeniedHandler.class | |||
com\tuoheng\config\SecurityConfig.class | |||
com\tuoheng\controller\UserController.class | |||
com\tuoheng\until\RedisUtils.class | |||
com\tuoheng\until\CryptoUtil.class | |||
com\tuoheng\config\IdTokenCustomizerConfig.class | |||
com\tuoheng\until\VerifyCode.class | |||
com\tuoheng\until\VerifyUtil.class | |||
com\tuoheng\SpringAuthorizationServerApplication.class | |||
com\tuoheng\handler\AuthenticationEntryPoint.class | |||
com\tuoheng\until\RegisteredClientUtil.class | |||
com\tuoheng\mapper\UserMapper.class | |||
com\tuoheng\model\po\UserPo.class | |||
com\tuoheng\service\impl\UserServiceImpl.class | |||
com\tuoheng\controller\Oauth2Controller.class | |||
com\tuoheng\constants\CommonConstant.class | |||
com\tuoheng\config\AuthorizationServerConfig.class | |||
com\tuoheng\config\MyCorsFilter.class | |||
com\tuoheng\config\JWKSourceConfig.class | |||
com\tuoheng\mapper\AuthoritiesMapper.class | |||
com\tuoheng\controller\HealthController.class | |||
com\tuoheng\oauth2\authentication\OAuth2ResourceOwnerPasswordAuthenticationConverter.class | |||
com\tuoheng\model\po\AuthoritiesPo.class | |||
com\tuoheng\config\VerifyCodeFilter.class | |||
com\tuoheng\model\dto\UserBaseInfoDto.class | |||
com\tuoheng\oauth2\authentication\OAuth2EndpointUtils.class | |||
com\tuoheng\model\param\CreateUserDto.class | |||
com\tuoheng\oauth2\authentication\OAuth2ResourceOwnerPasswordAuthenticationProvider.class | |||
com\tuoheng\service\OidcUserInfoService.class | |||
com\tuoheng\model\param\GetUserInfoDto.class |
@@ -0,0 +1,37 @@ | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\model\po\UserPo.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\config\VerifyCodeFilter.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\model\dto\UserBaseInfoDto.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\service\impl\OidcUserInfoServiceImpl.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\oauth2\authentication\OAuth2ResourceOwnerPasswordAuthenticationConverter.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\config\MyCorsFilter.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\service\impl\UserServiceImpl.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\until\VerifyCode.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\SpringAuthorizationServerApplication.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\until\VerifyUtil.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\model\param\GetUserInfoDto.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\until\RegisteredClientUtil.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\constants\CommonConstant.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\model\dto\ClientRoleDto.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\oauth2\authentication\OAuth2ResourceOwnerPasswordAuthenticationProvider.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\mapper\AuthoritiesMapper.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\oauth2\authentication\OAuth2ResourceOwnerPasswordAuthenticationToken.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\model\param\CreateUserDto.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\model\po\AuthoritiesPo.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\model\dto\JwtUser.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\service\OidcUserInfoService.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\controller\VerifyCodeController.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\oauth2\authentication\OAuth2EndpointUtils.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\controller\Oauth2Controller.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\controller\HealthController.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\mapper\UserMapper.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\until\CryptoUtil.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\until\JsonResult.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\handler\AccessDeniedHandler.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\handler\AuthenticationEntryPoint.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\config\JWKSourceConfig.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\config\AuthorizationServerConfig.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\config\SecurityConfig.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\controller\UserController.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\service\UserSevice.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\config\IdTokenCustomizerConfig.java | |||
D:\myprojects\tuohen\tuoheng_oidc\tuoheng_oidc_server\src\main\java\com\tuoheng\until\RedisUtils.java |