Commit 29da8e58 by XiaHou

云应用相关的业务代码

parent 7e87530e
......@@ -3,18 +3,15 @@ package com.hwstudio.antaile.controller;
import com.hwstudio.antaile.dto.*;
import com.hwstudio.antaile.entity.AtlTime;
import com.hwstudio.antaile.entity.AtlUser;
import com.hwstudio.antaile.mbg.po.AtlTimeMenu;
import com.hwstudio.antaile.mbg.po.SysAtlTime;
import com.hwstudio.antaile.queryparam.QueryAtlTimeByBlessIdAndIdxParam;
import com.hwstudio.antaile.service.*;
import com.hwstudio.antaile.utils.JsonResult;
import com.hwstudio.antaile.utils.RedisUtil;
import com.hwstudio.antaile.vo.*;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;
......@@ -607,4 +604,10 @@ public class AtlTimeController extends BaseController {
return this.atlTimeService.selectAtlTimeCreateDateById(timeId);
}
@ApiOperation("根据时光纪id 查询用户id")
@RequestMapping(value = "/selectTimeUserIdByTimeId", method = RequestMethod.GET)
public JsonResult selectTimeUserIdByTimeId(@ApiParam(value = "时光纪id", required = true) @RequestParam(value = "timeId", required = true) Long timeId) {
return JsonResult.success("操作成功", this.atlTimeService.selectTimeUserIdByTimeId(timeId));
}
}
......@@ -3,6 +3,8 @@ package com.hwstudio.antaile.controller;
import com.hwstudio.antaile.dto.AtlUserInfoDto;
import com.hwstudio.antaile.dto.BindingMobileDto;
import com.hwstudio.antaile.dto.LoginUserDto;
import com.hwstudio.antaile.dto.RelationUserDTO;
import com.hwstudio.antaile.queryparam.QueryRelationUserParam;
import com.hwstudio.antaile.service.AtlUserService;
import com.hwstudio.antaile.utils.JsonResult;
import com.hwstudio.antaile.utils.RedisUtil;
......@@ -15,6 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Objects;
/**
......@@ -26,7 +29,7 @@ import java.util.Objects;
@RestController
@RequestMapping(value = "/atlUser")
@Api(tags = "用户相关接口")
@CrossOrigin(origins = "*",maxAge = 3600)
@CrossOrigin(origins = "*", maxAge = 3600)
public class AtlUserController extends BaseController {
@Autowired
......@@ -70,7 +73,7 @@ public class AtlUserController extends BaseController {
@RequestMapping(value = "BindingOffice")
@ApiOperation(value = "绑定公众号", httpMethod = "POST", notes = "绑定公众号")
@ApiResponses(@ApiResponse(code = 200, message = "请求成功", response = AtlUserInfoDto.class))
public JsonResult BindingOffice(LoginUserVo loginUserVo) throws Exception{
public JsonResult BindingOffice(LoginUserVo loginUserVo) throws Exception {
return atlUserService.bindingOffice(loginUserVo);
}
......@@ -80,14 +83,14 @@ public class AtlUserController extends BaseController {
@ApiImplicitParams({
@ApiImplicitParam(name = "wxCode", value = "微信code", required = true, dataType = "string", paramType = "query"),
})
public JsonResult bindingApplet(LoginUserVo loginUserVo) throws Exception{
public JsonResult bindingApplet(LoginUserVo loginUserVo) throws Exception {
return atlUserService.bindingApplet(loginUserVo);
}
@RequestMapping(value = "bindingAppletMobile")
@ApiOperation(value = "小程序绑定手机", httpMethod = "POST", notes = "小程序绑定手机")
@ApiResponses(@ApiResponse(code = 200, message = "请求成功", response = AtlUserInfoDto.class))
public JsonResult bindingAppletMobile(BindingMobileDto bindingMobileDto, LoginUserVo loginUserVo) throws Exception{
public JsonResult bindingAppletMobile(BindingMobileDto bindingMobileDto, LoginUserVo loginUserVo) throws Exception {
return atlUserService.bindingAppletMobile(bindingMobileDto, loginUserVo);
}
......@@ -163,7 +166,7 @@ public class AtlUserController extends BaseController {
return JsonResult.notLogin();
}
LoginUserDto loginUserDto = atlUserService.bindWX(userId, loginUserVo);
return JsonResult.success("绑定微信成功",loginUserDto);
return JsonResult.success("绑定微信成功", loginUserDto);
}
@RequestMapping(value = "isMyself")
......@@ -176,10 +179,10 @@ public class AtlUserController extends BaseController {
})
public JsonResult isMyself(Long id, String type, Long userId) {
if(null == userId){
if (null == userId) {
userId = super.getUserId();
if (Objects.isNull(userId)) {
return JsonResult.success("请求成功",false);
return JsonResult.success("请求成功", false);
}
}
return atlUserService.isMyself(type, id, userId);
......@@ -251,5 +254,10 @@ public class AtlUserController extends BaseController {
return atlUserService.deleteAddress(vo);
}
@ApiOperation("根据传入参数查询 用户List,不传分页参数不分页")
@RequestMapping(value = "/selectRelationUserListByOther", method = RequestMethod.GET)
public JsonResult<List<RelationUserDTO>> selectRelationUserListByOther(@ModelAttribute QueryRelationUserParam queryRelationUserParam) {
return JsonResult.success("查询成功", this.atlUserService.selectRelationUserListByOther(queryRelationUserParam));
}
}
......@@ -63,7 +63,7 @@ public class AtlTimeOwnerDto {
@ApiModelProperty(value="婚姻 1-未婚 2-已婚 3-离异")
private Integer emotionalState;
@ApiModelProperty(value="是否过世 0 过世 1 在世")
@ApiModelProperty(value="是否过世 0 在世 1 过世")
private Integer livingState;
@ApiModelProperty(value="卒年开始")
......
......@@ -18,7 +18,7 @@ public class OfficialWebsiteAtlTimeParam implements Serializable {
private Integer isCommend;
@ApiModelProperty(value = "是否发现页推荐 0-否 1-是")
private Integer isFindCommend;
@ApiModelProperty(value = "是否过世 0 过世 1 在世")
@ApiModelProperty(value = "是否过世 0 在世 1 过世")
private Integer livingState;
@ApiModelProperty(value = "分页对象,不传递不分页")
private Page page;
......
package com.hwstudio.antaile.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @Author xh
* @Date 2021/7/23
* description:
*/
@Data
public class RelationUserDTO implements Serializable {
@ApiModelProperty(value = "用户id")
private Long id;
@ApiModelProperty(value = "昵称")
private String nickName;
@ApiModelProperty(value = "头像")
private String avaterImageUrl;
@ApiModelProperty(value = "最后登录时间")
private Date loginDate;
@ApiModelProperty(value = "性别 1-男 2-女")
private Integer sex;
@ApiModelProperty(value = "关联时光纪id")
private Long fromTimeid;
@ApiModelProperty(value = "关联时光纪名称")
private String fromTimeName;
}
package com.hwstudio.antaile.mapper;
import com.hwstudio.antaile.dto.AtlSearchDto;
import com.hwstudio.antaile.dto.AtlTimeArticleDetailsDto;
import com.hwstudio.antaile.dto.AtlTimeArticleListDto;
import com.hwstudio.antaile.entity.AtlTimeArticle;
import com.hwstudio.antaile.vo.AtlTimeArticleVo;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
......@@ -17,15 +15,15 @@ public interface AtlTimeArticleMapper {
void update(AtlTimeArticle atlTimeArticle);
Integer getCount(@Param("id")Long id, @Param("type")int type);
Integer getCount(@Param("id") Long id, @Param("type") int type);
List<Map<String, Object>> getArticelList(@Param("timeId")Long timeId, @Param("type")Integer type);
List<Map<String, Object>> getArticelList(@Param("timeId") Long timeId, @Param("type") Integer type);
List<Map<String, Object>> getH5ArticelList(@Param("timeId")Long timeId, @Param("type")Integer type);
List<Map<String, Object>> getH5ArticelList(@Param("timeId") Long timeId, @Param("type") Integer type);
Map<String, Object> getDetails(@Param("id")Long id);
Map<String, Object> getDetails(@Param("id") Long id);
List<Map<String, Object>> getArticelTypeList(@Param("timeId")Long timeId, @Param("type")Integer type);
List<Map<String, Object>> getArticelTypeList(@Param("timeId") Long timeId, @Param("type") Integer type);
void deleteArticle(@Param("id") Long id);
......@@ -33,26 +31,26 @@ public interface AtlTimeArticleMapper {
void deleteRealByTimeId(@Param("id") Long id);
AtlTimeArticle getById(@Param("id")Long id);
AtlTimeArticle getById(@Param("id") Long id);
List<String> getMaterialByTimeId(@Param("id")Long id);
List<String> getMaterialByTimeId(@Param("id") Long id);
List<String> getMaterialByUserId(@Param("userId")Long userId);
List<String> getMaterialByUserId(@Param("userId") Long userId);
List<Map<String,Object>> search(AtlSearchDto atlSearchDto);
List<Map<String, Object>> search(AtlSearchDto atlSearchDto);
Long getUserId(@Param("id") Long id);
List<Map<String,Object>> findArticleLabelList(@Param("userId")Long userId);
List<Map<String, Object>> findArticleLabelList(@Param("userId") Long userId);
void restoreArticle(@Param("id") Long id);
void restoreArticleByTimeId(@Param("id") Long id);
List<Map<String,Object>> findArticlelListDel(@Param("userId")Long userId);
List<Map<String, Object>> findArticlelListDel(@Param("userId") Long userId);
List<AtlTimeArticleListDto> findAllArticleListByDel(@Param("date")Date date);
List<AtlTimeArticleListDto> findAllArticleListByDel(@Param("date") Date date);
void deleteRealBatch(@Param("list")List list);
void deleteRealBatch(@Param("list") List list);
}
\ No newline at end of file
......@@ -125,4 +125,12 @@ public interface AtlTimeMapper {
* @return
*/
AtlTimeDTO selectAtlTimeInfoByBlessIdAndIdx(@Param("blessId") Long blessId, @Param("blessIdx") Integer blessIdx);
/**
* 根据时光纪id 查询用户id
*
* @param timeId
* @return
*/
Long selectTimeUserIdByTimeId(Long timeId);
}
\ No newline at end of file
......@@ -2,8 +2,10 @@ package com.hwstudio.antaile.mapper;
import com.hwstudio.antaile.dto.AtlUserInfoDto;
import com.hwstudio.antaile.dto.AtlUserPhoneTypeDto;
import com.hwstudio.antaile.dto.RelationUserDTO;
import com.hwstudio.antaile.entity.AtlUser;
import com.hwstudio.antaile.entity.AtlUserPhoneType;
import com.hwstudio.antaile.queryparam.QueryRelationUserParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -67,4 +69,12 @@ public interface AtlUserMapper {
* @return
*/
AtlUser selectOneUserByMobilePhone(String mobilePhone);
/**
* 查询时光纪关联用户list
*
* @param queryRelationUserParam
* @return
*/
List<RelationUserDTO> selectRelationUserListByOther(QueryRelationUserParam queryRelationUserParam);
}
\ No newline at end of file
package com.hwstudio.antaile.mbg.mapper;
import com.hwstudio.antaile.mbg.po.SysAtlTimeOwner;
import com.hwstudio.antaile.mbg.po.SysAtlTimeOwnerExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface SysAtlTimeOwnerMapper {
long countByExample(SysAtlTimeOwnerExample example);
int deleteByExample(SysAtlTimeOwnerExample example);
int deleteByPrimaryKey(Long id);
int insert(SysAtlTimeOwner record);
int insertSelective(SysAtlTimeOwner record);
List<SysAtlTimeOwner> selectByExampleWithBLOBs(SysAtlTimeOwnerExample example);
List<SysAtlTimeOwner> selectByExample(SysAtlTimeOwnerExample example);
SysAtlTimeOwner selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") SysAtlTimeOwner record, @Param("example") SysAtlTimeOwnerExample example);
int updateByExampleWithBLOBs(@Param("record") SysAtlTimeOwner record, @Param("example") SysAtlTimeOwnerExample example);
int updateByExample(@Param("record") SysAtlTimeOwner record, @Param("example") SysAtlTimeOwnerExample example);
int updateByPrimaryKeySelective(SysAtlTimeOwner record);
int updateByPrimaryKeyWithBLOBs(SysAtlTimeOwner record);
int updateByPrimaryKey(SysAtlTimeOwner record);
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
package com.hwstudio.antaile.queryparam;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @Author xh
* @Date 2021/7/23
* description:
*/
@Data
public class QueryRelationUserParam implements Serializable {
@ApiModelProperty(value = "注册来源于时光纪ID, 0为其它 ,非0对应时光纪id")
private Long fromTimeid;
@ApiModelProperty(value = "推荐人ID(用于用户邀请注册使用)")
private Long fromUserid;
}
......@@ -5,7 +5,10 @@ import com.github.binarywang.java.emoji.EmojiConverter;
import com.github.pagehelper.PageHelper;
import com.google.common.base.Preconditions;
import com.hwstudio.antaile.dto.*;
import com.hwstudio.antaile.entity.*;
import com.hwstudio.antaile.entity.AtlPrivate;
import com.hwstudio.antaile.entity.AtlTimeArticle;
import com.hwstudio.antaile.entity.AtlTimeArticleFile;
import com.hwstudio.antaile.entity.AtlTimeArticleImage;
import com.hwstudio.antaile.mapper.*;
import com.hwstudio.antaile.vo.AtlTimeArticleFileVo;
import com.vdurmont.emoji.EmojiParser;
......@@ -18,7 +21,10 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Name:
......@@ -380,7 +386,7 @@ public class AtlTimeArticleServie {
}
public Integer getArticleCountByTimeId(Long timeId) {
List list = atlTimeArticleMapper.getArticelList(timeId,1);
List list = atlTimeArticleMapper.getArticelList(timeId, 1);
return list.size();
}
......@@ -405,8 +411,8 @@ public class AtlTimeArticleServie {
atlTimeArticleDetailsDto.setPrivacySetting(Integer.parseInt(map.get("privacySetting").toString()));
atlTimeArticleDetailsDto.setType(Integer.parseInt(map.get("type").toString()));
atlTimeArticleDetailsDto.setCreateDate(map.get("createDate").toString());
atlTimeArticleDetailsDto.setTimeName(map.get("timeName")+"");
atlTimeArticleDetailsDto.setTimeName(map.get("authorName")+"");
atlTimeArticleDetailsDto.setTimeName(map.get("timeName") + "");
atlTimeArticleDetailsDto.setTimeName(map.get("authorName") + "");
if (atlTimeArticleDetailsDto.getType() == 1) {
atlTimeArticleDetailsDto.setAuthor(map.get("author").toString());
atlTimeArticleDetailsDto.setOccurTime(map.get("occurTime").toString());
......@@ -689,4 +695,5 @@ public class AtlTimeArticleServie {
}
return list;
}
}
......@@ -93,7 +93,10 @@ public class AtlTimeOwnerService {
} else {
map.put("identity", "隐私");
}
boolean birthDate = (boolean) jsonObject.get("birthDate");
boolean birthDate = false;
if(jsonObject.get("birthDate") != null){
birthDate = (boolean)jsonObject.get("birthDate") ;
}
if (birthDate) {
map.put("birthDate", atlTimeOwnerDto.getBirthdate());
} else {
......
......@@ -11,6 +11,7 @@ import com.hwstudio.antaile.entity.*;
import com.hwstudio.antaile.exception.BusinessException;
import com.hwstudio.antaile.mapper.*;
import com.hwstudio.antaile.mbg.mapper.SysAtlTimeMapper;
import com.hwstudio.antaile.mbg.mapper.SysAtlTimeOwnerMapper;
import com.hwstudio.antaile.mbg.po.SysAtlTime;
import com.hwstudio.antaile.queryparam.QueryAtlTimeByBlessIdAndIdxParam;
import com.hwstudio.antaile.queryparam.QueryAtlTimeCountParam;
......@@ -60,6 +61,8 @@ public class AtlTimeService {
private AtlTimeMessageMapper atlTimeMessageMapper;
@Resource
private SysAtlTimeMapper sysAtlTimeMapper;
@Resource
private SysAtlTimeOwnerMapper sysAtlTimeOwnerMapper;
/**
* 新增时光纪
......@@ -99,12 +102,18 @@ public class AtlTimeService {
}
atlTimeMapper.insert(atlTime);
//新增关于谁数据
//如果对象不为空普通插入 新增关于谁数据
if(atlTimeVo.getSysAtlTimeOwner() == null){
AtlTimeOwner atlTimeOwner = new AtlTimeOwner();
atlTimeOwner.setRealName(atlTime.getAboutName());
atlTimeOwner.setSourceFrom(0);
atlTimeOwner.setTimeId(atlTime.getId());
atlTimeOwnerMapper.insert(atlTimeOwner);
}else{
atlTimeVo.getSysAtlTimeOwner().setTimeId(atlTime.getId());
sysAtlTimeOwnerMapper.insertSelective(atlTimeVo.getSysAtlTimeOwner());
}
}
//如果隐私设置为验证查看时
......@@ -906,5 +915,16 @@ public class AtlTimeService {
return JsonResult.success("获取成功", dataMap);
}
/**
* 根据时光纪id 查询用户id
*
* @param timeId
* @return
*/
public Long selectTimeUserIdByTimeId(Long timeId) {
return this.atlTimeMapper.selectTimeUserIdByTimeId(timeId);
}
}
......@@ -7,6 +7,7 @@ import com.hwstudio.antaile.dto.*;
import com.hwstudio.antaile.entity.*;
import com.hwstudio.antaile.exception.BusinessException;
import com.hwstudio.antaile.mapper.*;
import com.hwstudio.antaile.queryparam.QueryRelationUserParam;
import com.hwstudio.antaile.utils.JsonResult;
import com.hwstudio.antaile.utils.OpenIdUtil;
import com.hwstudio.antaile.utils.RedisUtil;
......@@ -208,7 +209,7 @@ public class AtlUserService {
}
//校验手机号是否已经存在过
AtlUser atlUser = this.atlUserMapper.selectOneUserByMobilePhone(verifyCodeLogin.getMobilePhone());
if(atlUser == null){
if (atlUser == null) {
throw new BusinessException("不存在此手机号");
}
//否则有查询到 就登录成功
......@@ -732,4 +733,14 @@ public class AtlUserService {
return JsonResult.success(msg + "成功");
}
/**
* 查询时光纪关联用户list
*
* @param queryRelationUserParam
* @return
*/
public List<RelationUserDTO> selectRelationUserListByOther(QueryRelationUserParam queryRelationUserParam) {
return this.atlUserMapper.selectRelationUserListByOther(queryRelationUserParam);
}
}
......@@ -51,6 +51,8 @@ public class RegisterService {
atlUser.setNickName(nickName);
atlUser.setMobilePhone(mobile);
atlUser.setLoginPassword(pwd);
atlUser.setFromTimeid(fromTimeid);
atlUser.setFromUserid(fromUserid);
atlUserMapper.registerMobile(atlUser);
}
}
......@@ -11,10 +11,8 @@ import com.hwstudio.antaile.mapper.AtlUserMapper;
import com.hwstudio.antaile.mapper.SmsMapper;
import com.hwstudio.antaile.utils.AliCloudUtil;
import com.hwstudio.antaile.utils.MomoUtils;
import com.hwstudio.antaile.utils.VerificationUtil;
import net.sf.json.JSONObject;
import org.apache.commons.lang3.RandomUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
......@@ -39,6 +37,7 @@ public class SmsService {
/**
* 功能描述: <br>短信发送
* 〈〉
*
* @since: 1.0.0
* @Author:Momo
* @Date: 2019/5/26 12:41
......@@ -62,27 +61,27 @@ public class SmsService {
}
String templateCode;
AtlUser atlUser = atlUserMapper.getByMobile(mobile);
Boolean isMatch = MomoUtils.phone(mobile);
switch (type){
Boolean isMatch = MomoUtils.validTel(mobile);
switch (type) {
case Constants.SMS_TYPE_REGISTER:
if(atlUser != null){
if (atlUser != null) {
throw new BusinessException("该手机号已注册");
}
if(isMatch){
if (isMatch) {
templateCode = Constants.SMS_TYPE_REGISTER_VALUE;
}else{
} else {
templateCode = Constants.SMS_TYPE_REGISTER_VALUE_INTERNATIONAL;
}
break;
case Constants.SMS_TYPE_UPDATEPASSWORD:
if(atlUser == null){
if (atlUser == null) {
throw new BusinessException("该手机号未注册");
}
if(isMatch){
if (isMatch) {
templateCode = Constants.SMS_TYPE_UPDATEPASSWORD_VALUE;
}else{
} else {
templateCode = Constants.SMS_TYPE_UPDATEPASSWORD_VALUE_INTERNATIONAL;
}
......@@ -92,13 +91,13 @@ public class SmsService {
throw new BusinessException("该手机号已被绑定");
}*/
templateCode = Constants.SMS_TYPE_BINDINGMOBILE_VALUE;
if(isMatch == false){
if (isMatch == false) {
templateCode = Constants.SMS_TYPE_BINDINGMOBILE_VALUE_INTERNATIONAL;
}
break;
case Constants.SMS_TYPE_MOBILELOGIN:
templateCode = Constants.SMS_TYPE_MOBILELOGIN_VALUE;
if(isMatch == false){
if (isMatch == false) {
templateCode = Constants.SMS_TYPE_MOBILELOGIN_VALUE_INTERNATIONAL;
}
break;
......@@ -107,9 +106,9 @@ public class SmsService {
}
}
String verifyCode = RandomUtils.nextInt(100000, 1000000) + "";
JSONObject jsonObject= new JSONObject();
JSONObject jsonObject = new JSONObject();
jsonObject.put("code", verifyCode);
System.out.println("----------------------------------手机发送的验证码为:"+verifyCode);
System.out.println("----------------------------------手机发送的验证码为:" + verifyCode);
Sms sms = new Sms();
sms.setPhonenumber(mobile);
sms.setVerifycode(verifyCode);
......@@ -120,13 +119,13 @@ public class SmsService {
try {
CommonResponse response = AliCloudUtil.sendSms(mobile, templateCode, jsonObject);
if(response == null){
if (response == null) {
throw new BusinessException("验证码发送失败");
}
JSONObject json = JSONObject.fromObject(response.getData());
if("OK".equals(json.get("Code"))){
if ("OK".equals(json.get("Code"))) {
smsMapper.updateState(sms.getId(), 1);
}else{
} else {
smsMapper.updateState(sms.getId(), 2);
throw new BusinessException("验证码发送失败");
}
......
......@@ -58,7 +58,7 @@ public class AliCloudUtil {
*/
public static CommonResponse sendSms(String mobile, String templateCode, JSONObject json) throws ClientException {
DefaultProfile profile = DefaultProfile.getProfile("default", accessKeyId, accessKeySecret);
DefaultProfile profile = DefaultProfile.getProfile("cn-hangzhou", accessKeyId, accessKeySecret);
IAcsClient client = new DefaultAcsClient(profile);
CommonRequest request = new CommonRequest();
......
......@@ -285,4 +285,18 @@ public class MomoUtils {
boolean isMatch = m.matches();
return isMatch;
}
/**
* 验证是否中国手机号
*
* @param tel
* @return
*/
public static boolean validTel(String tel) {
String regex = "^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$";
boolean flag = tel.matches(regex);
return flag;
}
}
......@@ -67,7 +67,7 @@ public class AtlTimeOwnerVo {
@ApiModelProperty(value="婚姻 1-未婚 2-已婚 3-离异")
private Integer emotionalState;
@ApiModelProperty(value="是否过世 0 过世 1 在世")
@ApiModelProperty(value="是否过世 0 在世 1 过世")
private Integer livingState;
@ApiModelProperty(value="卒年开始")
......
package com.hwstudio.antaile.vo;
import com.hwstudio.antaile.mbg.po.SysAtlTimeOwner;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -85,4 +86,6 @@ public class AtlTimeVo {
private Integer blessIdx;
@ApiModelProperty(value = "oss配置时光纪相关的路径")
private String ossCatalogue;
@ApiModelProperty(value = "时光纪关于谁对象")
private SysAtlTimeOwner sysAtlTimeOwner;
}
......@@ -342,4 +342,8 @@
and a.bless_idx=#{blessIdx}
and a.status = 1
</select>
<select id="selectTimeUserIdByTimeId" parameterType="java.lang.Long" resultType="java.lang.Long">
select user_id from atl_time where id = #{id}
</select>
</mapper>
\ No newline at end of file
......@@ -401,4 +401,20 @@
SELECT * FROM atl_user WHERE mobile_phone=#{mobilePhone}
</select>
<select id="selectRelationUserListByOther" parameterType="com.hwstudio.antaile.queryparam.QueryRelationUserParam" resultType="com.hwstudio.antaile.dto.RelationUserDTO">
select
a.id,a.nick_name nickName,a.sex,a.login_date loginDate,
a.avater_image_url avaterImageUrl,a.from_timeid fromTimeid,a.from_userid fromUserid,
b.name fromTimeName
from atl_user a
left join atl_time b ON a.from_timeid = b.id
where 1 = 1
<if test="fromTimeid != null">
and a.from_timeid =#{fromTimeid}
</if>
<if test="fromUserid != null">
and a.from_userid =#{fromUserid}
</if>
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment