init
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
package com.ruoyi.xq.controller.app;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.BeanConvertUtil;
|
||||
import com.ruoyi.xq.domain.AreaCode;
|
||||
import com.ruoyi.xq.dto.app.areacode.AreaCodeHomeVo;
|
||||
import com.ruoyi.xq.dto.app.areacode.AreaCodeQuery;
|
||||
import com.ruoyi.xq.dto.app.areacode.AreaCodeTree;
|
||||
import com.ruoyi.xq.dto.app.setting.AgreementDTO;
|
||||
@@ -54,6 +57,16 @@ public class SettingAppController {
|
||||
return R.ok(new AgreementDTO(anchorJoinAgreement));
|
||||
}
|
||||
|
||||
@GetMapping("/areaCode/homeCity")
|
||||
@Operation(summary = "获取首页城市选择列表")
|
||||
@Log(title = "获取首页城市选择列表", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
public R<List<AreaCodeHomeVo>> homeCity(){
|
||||
List<AreaCode> list = areaCodeService.list(Wrappers.lambdaQuery(AreaCode.class).eq(AreaCode::getLevel, "city"));
|
||||
List<AreaCodeHomeVo> vos = BeanConvertUtil.convertListTo(list, AreaCodeHomeVo::new);
|
||||
return R.ok(vos);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/areaCode/list")
|
||||
@Operation(summary = "获取省市区编码接口")
|
||||
@Log(title = "获取省市区编码接口", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
|
||||
@@ -28,6 +28,7 @@ public class AreaCode implements Serializable {
|
||||
* 名字
|
||||
*/
|
||||
private String name;
|
||||
private String firstSpell;
|
||||
/**
|
||||
* country:国家、province:省份(直辖市会在province和city显示)、city:市(直辖市会在province和city显示)、district:区县
|
||||
*/
|
||||
|
||||
@@ -89,8 +89,11 @@ public class User implements Serializable {
|
||||
/**
|
||||
* 居住地代码
|
||||
*/
|
||||
private String residenceCode;
|
||||
// private String residenceCityCode;
|
||||
private Integer residenceCode;
|
||||
/**
|
||||
* 居住地城市编码
|
||||
*/
|
||||
private Integer residenceCityCode;
|
||||
/**
|
||||
* 居住城市
|
||||
*/
|
||||
|
||||
@@ -35,6 +35,8 @@ public class UserAuth implements Serializable {
|
||||
* 用户号
|
||||
*/
|
||||
private String usercode;
|
||||
|
||||
private Integer alreadyAuthNum;
|
||||
/**
|
||||
* 实名认证 0-待提交 1-审核中 2-审核通过(认证成功) 3-审核失败
|
||||
*/
|
||||
|
||||
@@ -119,7 +119,7 @@ public class UserInfo implements Serializable {
|
||||
* 择偶条件-地区
|
||||
*/
|
||||
private String filterResidence;
|
||||
private String filterResidenceCode;
|
||||
private Integer filterResidenceCode;
|
||||
/**
|
||||
* 择偶条件-年收入
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.ruoyi.xq.dto.app.areacode;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AreaCodeHomeVo {
|
||||
private Integer code;
|
||||
private String name;
|
||||
private String firstSpell;
|
||||
}
|
||||
@@ -22,7 +22,7 @@ public class DynamicQuery {
|
||||
private Integer ageEnd;
|
||||
|
||||
@Schema(description = "居住地")
|
||||
private String residenceCode;
|
||||
private Integer residenceCode;
|
||||
|
||||
@Schema(description = "1-最新发布 2-热门动态")
|
||||
private Integer sortBy = 1;
|
||||
|
||||
@@ -41,10 +41,12 @@ public class HomePageReq extends PageQuery {
|
||||
private Integer marriage;
|
||||
@Schema(description = "教育")
|
||||
private Integer education;
|
||||
@Schema(description = "居住城市编码")
|
||||
private String residenceCityCode;
|
||||
// @Schema(description = "居住地")
|
||||
// private String residenceCode;
|
||||
@Schema(description = "居住地城市中文")
|
||||
private String residenceCodeStr;
|
||||
// private Integer residenceCode;
|
||||
// @Schema(description = "居住地城市中文")
|
||||
// private String residenceCodeStr;
|
||||
@Schema(description = "VIP查询限制")
|
||||
private VipQuery vipQuery;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ public class UpdateBaseInfoReq {
|
||||
* 居住地
|
||||
*/
|
||||
@Schema(description = "居住地")
|
||||
private String residenceCode;
|
||||
private Integer residenceCode;
|
||||
/**
|
||||
* 户籍地
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,7 @@ public class UpdateUserFullInfoReq {
|
||||
private String wxCode;
|
||||
|
||||
@Schema(description = "居住地")
|
||||
private String residenceCode;
|
||||
private Integer residenceCode;
|
||||
@Schema(description = "户籍地")
|
||||
private String addressCode;
|
||||
@Schema(description = "学历")
|
||||
@@ -87,7 +87,7 @@ public class UpdateUserFullInfoReq {
|
||||
@Schema(description = "择偶条件-学历")
|
||||
private Integer filterEducation;
|
||||
@Schema(description = "择偶条件-地区Code")
|
||||
private String filterResidenceCode;
|
||||
private Integer filterResidenceCode;
|
||||
@Schema(description = "择偶条件-年收入")
|
||||
private Integer filterAnnualIncome;
|
||||
@Schema(description = "择偶条件-小孩情况")
|
||||
|
||||
@@ -67,7 +67,7 @@ public class CurrentUserFullInfoVo {
|
||||
* 居住地
|
||||
*/
|
||||
@Schema(description = "居住地")
|
||||
private String residenceCode;
|
||||
private Integer residenceCode;
|
||||
@Schema(description = "居住地名称")
|
||||
private String residenceName;
|
||||
@Schema(description = "居住地城市")
|
||||
@@ -216,7 +216,7 @@ public class CurrentUserFullInfoVo {
|
||||
@Schema(description = "择偶条件-地区")
|
||||
private String filterResidence;
|
||||
@Schema(description = "择偶条件-地区Code")
|
||||
private String filterResidenceCode;
|
||||
private Integer filterResidenceCode;
|
||||
/**
|
||||
* 择偶条件-年收入
|
||||
*/
|
||||
|
||||
@@ -47,7 +47,7 @@ public class CurrentUserInfoVo {
|
||||
@Schema(description = "居住地名称")
|
||||
private String residenceName;
|
||||
@Schema(description = "居住地编码")
|
||||
private String residenceCode;
|
||||
private Integer residenceCode;
|
||||
@Schema(description = "户籍地名称")
|
||||
private String addressName;
|
||||
@Schema(description = "户籍地编码")
|
||||
@@ -65,9 +65,6 @@ public class CurrentUserInfoVo {
|
||||
@Schema(description = "imToken")
|
||||
private String imToken;
|
||||
|
||||
@Schema(description = "交换微信次数")
|
||||
private Integer wxExchangeNum = 0;
|
||||
|
||||
@Schema(description = "已认证数量")
|
||||
private Integer alreadyAuthNum = 0;
|
||||
|
||||
@@ -90,7 +87,7 @@ public class CurrentUserInfoVo {
|
||||
* 交换微信次数
|
||||
*/
|
||||
@Schema(description = "交换微信次数")
|
||||
private Integer wxTransNum;
|
||||
private Integer wxTransNum = 0;
|
||||
/**
|
||||
* 相册
|
||||
*/
|
||||
|
||||
@@ -62,7 +62,7 @@ public class HomeUserVo {
|
||||
@Schema(description = "居住地名称")
|
||||
private String residenceName;
|
||||
@Schema(description = "居住地编码")
|
||||
private String residenceCode;
|
||||
private Integer residenceCode;
|
||||
/**
|
||||
* 户籍地
|
||||
*/
|
||||
@@ -208,7 +208,7 @@ public class HomeUserVo {
|
||||
private String filterResidence;
|
||||
|
||||
@Schema(description = "择偶条件-地区Code")
|
||||
private String filterResidenceCode;
|
||||
private Integer filterResidenceCode;
|
||||
/**
|
||||
* 择偶条件-年收入
|
||||
*/
|
||||
|
||||
@@ -111,6 +111,8 @@ public class CurrentUserManager {
|
||||
vo.setFinishBaseStatus(user.getFinishBaseStatus());
|
||||
vo.setBaseStep(user.getBaseStep());
|
||||
vo.setImToken(user.getImToken());
|
||||
UserAuth userAuth = userAuthService.getByUserId(userId);
|
||||
vo.setAlreadyAuthNum(userAuth.getAlreadyAuthNum());
|
||||
List<UserPictures> userPictures = userPicturesService.listByUserIdAuditingAndSuccess(user.getId());
|
||||
vo.setUserPicturesList(BeanConvertUtil.convertListTo(userPictures, UserPicturesDTO::new));
|
||||
UserVip userVip = userVipService.getByUserVipMaster(userId);
|
||||
@@ -143,10 +145,11 @@ public class CurrentUserManager {
|
||||
updateUser.setAddressCode(req.getAddressCode());
|
||||
updateUser.setAddressName(areaCode.getName());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(req.getResidenceCode())){
|
||||
if(req.getResidenceCode() != null){
|
||||
AreaCode areaCode = areaCodeService.getById(req.getResidenceCode());
|
||||
updateUser.setResidenceCode(req.getResidenceCode());
|
||||
updateUser.setResidenceName(areaCode.getName());
|
||||
updateUser.setResidenceCityCode(areaCode.getPcode());
|
||||
updateUser.setResidenceCityName(areaCode.getPname());
|
||||
}
|
||||
if(req.getHeight() != null){
|
||||
@@ -263,7 +266,7 @@ public class CurrentUserManager {
|
||||
updateUser.setAddressCode(req.getAddressCode());
|
||||
updateUser.setAddressName(areaCode.getFullname());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(req.getResidenceCode())){
|
||||
if(req.getResidenceCode() != null){
|
||||
AreaCode areaCode = areaCodeService.getById(req.getResidenceCode());
|
||||
updateUser.setResidenceCode(req.getResidenceCode());
|
||||
updateUser.setResidenceName(areaCode.getFullname());
|
||||
@@ -273,7 +276,7 @@ public class CurrentUserManager {
|
||||
userService.updateById(updateUser);
|
||||
|
||||
UserInfo updateUserInfo = BeanConvertUtil.convertTo(req, UserInfo::new);
|
||||
if(StringUtils.isNotEmpty(req.getFilterResidenceCode())){
|
||||
if(req.getFilterResidenceCode() != null){
|
||||
AreaCode areaCode = areaCodeService.getById(req.getResidenceCode());
|
||||
updateUserInfo.setFilterResidenceCode(req.getFilterResidenceCode());
|
||||
updateUserInfo.setFilterResidence(areaCode.getFullname());
|
||||
|
||||
@@ -220,6 +220,7 @@ public class LoginManager {
|
||||
userAuth.setUserId(user.getId());
|
||||
userAuth.setPhone(user.getMobile());
|
||||
userAuth.setPhoneAuth(AuditEnum.SUCCESS.getCode());
|
||||
userAuth.setAlreadyAuthNum(1);
|
||||
userAuthService.save(userAuth);
|
||||
UserExtend userExtend = new UserExtend();
|
||||
userExtend.setUsercode(usercode);
|
||||
|
||||
Reference in New Issue
Block a user