提交 198a32dd authored 作者: liupengfei's avatar liupengfei

--no commit message

上级 7c7dd861
...@@ -5,6 +5,7 @@ import org.springframework.beans.BeanUtils; ...@@ -5,6 +5,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zrqx.core.commons.model.member.Member;
import com.zrqx.core.enums.member.LevelEnum; import com.zrqx.core.enums.member.LevelEnum;
import com.zrqx.core.exception.BaseException; import com.zrqx.core.exception.BaseException;
import com.zrqx.core.mapper.BaseMapper; import com.zrqx.core.mapper.BaseMapper;
...@@ -15,7 +16,6 @@ import com.zrqx.member.bg.emember.mapper.ExpertMemberMapper; ...@@ -15,7 +16,6 @@ import com.zrqx.member.bg.emember.mapper.ExpertMemberMapper;
import com.zrqx.member.bg.member.mapper.MemberMapper; import com.zrqx.member.bg.member.mapper.MemberMapper;
import com.zrqx.member.commons.form.bg.emember.SaveOrUpdateEMemberForm; import com.zrqx.member.commons.form.bg.emember.SaveOrUpdateEMemberForm;
import com.zrqx.member.commons.model.ExpertMember; import com.zrqx.member.commons.model.ExpertMember;
import com.zrqx.member.commons.model.Member;
import com.zrqx.member.commons.vo.bg.member.EMemberVO; import com.zrqx.member.commons.vo.bg.member.EMemberVO;
@Service @Service
......
...@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.zrqx.core.commons.model.member.Member;
import com.zrqx.core.commons.redis.Redis; import com.zrqx.core.commons.redis.Redis;
import com.zrqx.core.enums.ResponseCodeEnum; import com.zrqx.core.enums.ResponseCodeEnum;
import com.zrqx.core.enums.StatusEnum; import com.zrqx.core.enums.StatusEnum;
...@@ -25,7 +26,6 @@ import com.zrqx.member.bg.omember.service.OrganMemberService; ...@@ -25,7 +26,6 @@ import com.zrqx.member.bg.omember.service.OrganMemberService;
import com.zrqx.member.bg.pmember.service.PersonalMemberService; import com.zrqx.member.bg.pmember.service.PersonalMemberService;
import com.zrqx.member.commons.form.bg.member.BatchUpdateStatusForm; import com.zrqx.member.commons.form.bg.member.BatchUpdateStatusForm;
import com.zrqx.member.commons.form.bg.member.UpdateMemberPasswordForm; import com.zrqx.member.commons.form.bg.member.UpdateMemberPasswordForm;
import com.zrqx.member.commons.model.Member;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
......
...@@ -5,8 +5,8 @@ import java.util.List; ...@@ -5,8 +5,8 @@ import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import com.zrqx.core.commons.model.member.Member;
import com.zrqx.core.mapper.BaseMapper; import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.member.commons.model.Member;
import com.zrqx.member.commons.vo.bg.pm.PmMemberListVO; import com.zrqx.member.commons.vo.bg.pm.PmMemberListVO;
public interface MemberMapper extends BaseMapper<Member>{ public interface MemberMapper extends BaseMapper<Member>{
......
...@@ -2,10 +2,10 @@ package com.zrqx.member.bg.member.service; ...@@ -2,10 +2,10 @@ package com.zrqx.member.bg.member.service;
import java.util.List; import java.util.List;
import com.zrqx.core.commons.model.member.Member;
import com.zrqx.core.service.BaseService; import com.zrqx.core.service.BaseService;
import com.zrqx.core.util.page.PageInfo; import com.zrqx.core.util.page.PageInfo;
import com.zrqx.core.util.page.PageParam; import com.zrqx.core.util.page.PageParam;
import com.zrqx.member.commons.model.Member;
import com.zrqx.member.commons.vo.bg.pm.PmMemberListVO; import com.zrqx.member.commons.vo.bg.pm.PmMemberListVO;
public interface MemberService extends BaseService<Member, Integer> { public interface MemberService extends BaseService<Member, Integer> {
......
...@@ -5,12 +5,12 @@ import java.util.List; ...@@ -5,12 +5,12 @@ import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zrqx.core.commons.model.member.Member;
import com.zrqx.core.mapper.BaseMapper; import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.service.BaseServiceImpl; import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.page.PageInfo; import com.zrqx.core.util.page.PageInfo;
import com.zrqx.core.util.page.PageParam; import com.zrqx.core.util.page.PageParam;
import com.zrqx.member.bg.member.mapper.MemberMapper; import com.zrqx.member.bg.member.mapper.MemberMapper;
import com.zrqx.member.commons.model.Member;
import com.zrqx.member.commons.vo.bg.pm.PmMemberListVO; import com.zrqx.member.commons.vo.bg.pm.PmMemberListVO;
@Service @Service
......
...@@ -5,7 +5,6 @@ import java.util.List; ...@@ -5,7 +5,6 @@ import java.util.List;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -16,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -16,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.zrqx.core.commons.model.member.Member;
import com.zrqx.core.enums.ResponseCodeEnum; import com.zrqx.core.enums.ResponseCodeEnum;
import com.zrqx.core.exception.BaseException; import com.zrqx.core.exception.BaseException;
import com.zrqx.core.util.encry.MD5Util; import com.zrqx.core.util.encry.MD5Util;
...@@ -25,9 +25,7 @@ import com.zrqx.core.util.page.PageParam; ...@@ -25,9 +25,7 @@ import com.zrqx.core.util.page.PageParam;
import com.zrqx.core.util.response.CallBack; import com.zrqx.core.util.response.CallBack;
import com.zrqx.member.bg.member.service.MemberService; import com.zrqx.member.bg.member.service.MemberService;
import com.zrqx.member.bg.omember.service.OrganMemberService; import com.zrqx.member.bg.omember.service.OrganMemberService;
import com.zrqx.member.commons.form.bg.member.BatchUpdateStatusForm;
import com.zrqx.member.commons.form.bg.omember.QueryOrganMemberForm; import com.zrqx.member.commons.form.bg.omember.QueryOrganMemberForm;
import com.zrqx.member.commons.model.Member;
import com.zrqx.member.commons.vo.bg.member.ExcelOrganMemberExportVo; import com.zrqx.member.commons.vo.bg.member.ExcelOrganMemberExportVo;
import com.zrqx.member.commons.vo.bg.member.OrganMemberListVO; import com.zrqx.member.commons.vo.bg.member.OrganMemberListVO;
import com.zrqx.member.commons.vo.bg.member.OrganMemberVO; import com.zrqx.member.commons.vo.bg.member.OrganMemberVO;
......
...@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestParam; ...@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.zrqx.core.commons.model.member.Member;
import com.zrqx.core.enums.ResponseCodeEnum; import com.zrqx.core.enums.ResponseCodeEnum;
import com.zrqx.core.exception.BaseException; import com.zrqx.core.exception.BaseException;
import com.zrqx.core.util.bean.BeanUtils; import com.zrqx.core.util.bean.BeanUtils;
...@@ -30,7 +31,6 @@ import com.zrqx.member.bg.omember.service.OrganMemberService; ...@@ -30,7 +31,6 @@ import com.zrqx.member.bg.omember.service.OrganMemberService;
import com.zrqx.member.bg.organ.service.OrganService; import com.zrqx.member.bg.organ.service.OrganService;
import com.zrqx.member.commons.form.bg.organ.QueryOrganForm; import com.zrqx.member.commons.form.bg.organ.QueryOrganForm;
import com.zrqx.member.commons.form.bg.organ.SaveOrUpdateOrganForm; import com.zrqx.member.commons.form.bg.organ.SaveOrUpdateOrganForm;
import com.zrqx.member.commons.model.Member;
import com.zrqx.member.commons.model.Organ; import com.zrqx.member.commons.model.Organ;
import com.zrqx.member.commons.model.OrganMember; import com.zrqx.member.commons.model.OrganMember;
import com.zrqx.member.commons.vo.bg.organ.OrganVO; import com.zrqx.member.commons.vo.bg.organ.OrganVO;
......
...@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.zrqx.core.commons.model.member.Member;
import com.zrqx.core.enums.ResponseCodeEnum; import com.zrqx.core.enums.ResponseCodeEnum;
import com.zrqx.core.exception.BaseException; import com.zrqx.core.exception.BaseException;
import com.zrqx.core.util.bean.Copy; import com.zrqx.core.util.bean.Copy;
...@@ -26,7 +27,6 @@ import com.zrqx.member.bg.member.service.MemberService; ...@@ -26,7 +27,6 @@ import com.zrqx.member.bg.member.service.MemberService;
import com.zrqx.member.bg.pm.service.PmMemberService; import com.zrqx.member.bg.pm.service.PmMemberService;
import com.zrqx.member.bg.pm.service.PrivateMessageService; import com.zrqx.member.bg.pm.service.PrivateMessageService;
import com.zrqx.member.commons.form.bg.pm.QueryPrivateMessageForm; import com.zrqx.member.commons.form.bg.pm.QueryPrivateMessageForm;
import com.zrqx.member.commons.model.Member;
import com.zrqx.member.commons.model.PmMember; import com.zrqx.member.commons.model.PmMember;
import com.zrqx.member.commons.model.PrivateMessage; import com.zrqx.member.commons.model.PrivateMessage;
import com.zrqx.member.commons.vo.bg.pm.PmMemberListVO; import com.zrqx.member.commons.vo.bg.pm.PmMemberListVO;
......
...@@ -10,6 +10,7 @@ import org.springframework.beans.BeanUtils; ...@@ -10,6 +10,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zrqx.core.commons.model.member.Member;
import com.zrqx.core.mapper.BaseMapper; import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.service.BaseServiceImpl; import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.page.PageInfo; import com.zrqx.core.util.page.PageInfo;
...@@ -20,7 +21,6 @@ import com.zrqx.member.bg.pm.mapper.PmMemberMapper; ...@@ -20,7 +21,6 @@ import com.zrqx.member.bg.pm.mapper.PmMemberMapper;
import com.zrqx.member.bg.pm.mapper.PrivateMessageMapper; import com.zrqx.member.bg.pm.mapper.PrivateMessageMapper;
import com.zrqx.member.bg.pmember.mapper.PersonalMemberMapper; import com.zrqx.member.bg.pmember.mapper.PersonalMemberMapper;
import com.zrqx.member.commons.form.bg.pm.QueryPrivateMessageForm; import com.zrqx.member.commons.form.bg.pm.QueryPrivateMessageForm;
import com.zrqx.member.commons.model.Member;
import com.zrqx.member.commons.model.PersonalMember; import com.zrqx.member.commons.model.PersonalMember;
import com.zrqx.member.commons.model.PmMember; import com.zrqx.member.commons.model.PmMember;
import com.zrqx.member.commons.model.PrivateMessage; import com.zrqx.member.commons.model.PrivateMessage;
......
...@@ -7,6 +7,7 @@ import org.springframework.beans.BeanUtils; ...@@ -7,6 +7,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zrqx.core.commons.model.member.Member;
import com.zrqx.core.enums.member.LevelEnum; import com.zrqx.core.enums.member.LevelEnum;
import com.zrqx.core.exception.BaseException; import com.zrqx.core.exception.BaseException;
import com.zrqx.core.mapper.BaseMapper; import com.zrqx.core.mapper.BaseMapper;
...@@ -19,7 +20,6 @@ import com.zrqx.member.bg.member.mapper.MemberMapper; ...@@ -19,7 +20,6 @@ import com.zrqx.member.bg.member.mapper.MemberMapper;
import com.zrqx.member.bg.pmember.mapper.PersonalMemberMapper; import com.zrqx.member.bg.pmember.mapper.PersonalMemberMapper;
import com.zrqx.member.commons.form.bg.member.QueryMemberForm; import com.zrqx.member.commons.form.bg.member.QueryMemberForm;
import com.zrqx.member.commons.form.bg.pmember.SaveOrUpdatePMemberForm; import com.zrqx.member.commons.form.bg.pmember.SaveOrUpdatePMemberForm;
import com.zrqx.member.commons.model.Member;
import com.zrqx.member.commons.model.PersonalMember; import com.zrqx.member.commons.model.PersonalMember;
import com.zrqx.member.commons.vo.bg.member.ExcelMemberExportVo; import com.zrqx.member.commons.vo.bg.member.ExcelMemberExportVo;
import com.zrqx.member.commons.vo.bg.member.MemberListVO; import com.zrqx.member.commons.vo.bg.member.MemberListVO;
......
package com.zrqx.member.commons.model;
import java.util.Date;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@Table(name = "m_Member")
@ApiModel(value = "Member", description = "用户基础信息")
public class Member {
@Id
@GeneratedValue(strategy =GenerationType.IDENTITY, generator = "SELECT REPLACE (UUID(), '-', '')")
@ApiModelProperty("会员id,新增时不需填写")
private String id;
@ApiModelProperty("会员账号")
private String account;
@ApiModelProperty("昵称")
private String nickName;
@ApiModelProperty("密码")
private String password;
@ApiModelProperty("手机号")
private String phone;
@ApiModelProperty("邮箱")
private String email;
@ApiModelProperty("用户状态 0 禁用 1启用")
private Integer status;
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("微信Key")
@JsonIgnore
private String wechatKey;
@ApiModelProperty("qqKey")
@JsonIgnore
private String qqKey;
/** @see com.zrqx.core.enums.member.LevelEnum */
@ApiModelProperty("用户类别:0 普通用户,1专家用户,2机构用户")
private Integer level;
@ApiModelProperty("创建时间")
@JsonIgnore
private Date uploadTime;
@ApiModelProperty("头像")
@Transient
private String cover;
}
package com.zrqx.member.fg.emember.service; package com.zrqx.member.fg.emember.service;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zrqx.core.exception.BaseException;
import com.zrqx.core.mapper.BaseMapper; import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.service.BaseServiceImpl; import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.datatype.DateUtils;
import com.zrqx.core.util.encry.MD5Util;
import com.zrqx.member.commons.form.bg.emember.SaveOrUpdateEMemberForm;
import com.zrqx.member.commons.model.ExpertMember; import com.zrqx.member.commons.model.ExpertMember;
import com.zrqx.member.commons.model.Member;
import com.zrqx.member.fg.emember.mapper.FgExpertMemberMapper; import com.zrqx.member.fg.emember.mapper.FgExpertMemberMapper;
import com.zrqx.member.fg.member.mapper.FgMemberMapper; import com.zrqx.member.fg.member.mapper.FgMemberMapper;
......
...@@ -3,8 +3,8 @@ package com.zrqx.member.fg.member.mapper; ...@@ -3,8 +3,8 @@ package com.zrqx.member.fg.member.mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import com.zrqx.core.commons.model.member.Member;
import com.zrqx.core.mapper.BaseMapper; import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.member.commons.model.Member;
public interface FgMemberMapper extends BaseMapper<Member>{ public interface FgMemberMapper extends BaseMapper<Member>{
......
package com.zrqx.member.fg.member.service; package com.zrqx.member.fg.member.service;
import com.zrqx.core.commons.form.LoginMemberInfo; import com.zrqx.core.commons.form.LoginMemberInfo;
import com.zrqx.core.commons.model.member.Member;
import com.zrqx.core.service.BaseService; import com.zrqx.core.service.BaseService;
import com.zrqx.member.commons.model.Member;
import com.zrqx.member.commons.vo.fg.personalcenter.MemberInfo; import com.zrqx.member.commons.vo.fg.personalcenter.MemberInfo;
public interface FgMemberService extends BaseService<Member, String> { public interface FgMemberService extends BaseService<Member, String> {
......
...@@ -8,12 +8,12 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -8,12 +8,12 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zrqx.core.commons.form.LoginMemberInfo; import com.zrqx.core.commons.form.LoginMemberInfo;
import com.zrqx.core.commons.model.member.Member;
import com.zrqx.core.enums.member.LevelEnum; import com.zrqx.core.enums.member.LevelEnum;
import com.zrqx.core.exception.BaseException; import com.zrqx.core.exception.BaseException;
import com.zrqx.core.mapper.BaseMapper; import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.service.BaseServiceImpl; import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.member.commons.model.ExpertMember; import com.zrqx.member.commons.model.ExpertMember;
import com.zrqx.member.commons.model.Member;
import com.zrqx.member.commons.model.Organ; import com.zrqx.member.commons.model.Organ;
import com.zrqx.member.commons.model.OrganMember; import com.zrqx.member.commons.model.OrganMember;
import com.zrqx.member.commons.model.PersonalMember; import com.zrqx.member.commons.model.PersonalMember;
......
package com.zrqx.member.fg.omember.service; package com.zrqx.member.fg.omember.service;
import com.zrqx.core.commons.model.member.Member;
import com.zrqx.core.service.BaseService; import com.zrqx.core.service.BaseService;
import com.zrqx.member.commons.model.Member;
import com.zrqx.member.commons.model.OrganMember; import com.zrqx.member.commons.model.OrganMember;
public interface FgOrganMemberService extends BaseService<OrganMember, String> { public interface FgOrganMemberService extends BaseService<OrganMember, String> {
......
...@@ -3,11 +3,11 @@ package com.zrqx.member.fg.omember.service; ...@@ -3,11 +3,11 @@ package com.zrqx.member.fg.omember.service;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zrqx.core.commons.model.member.Member;
import com.zrqx.core.enums.member.LevelEnum; import com.zrqx.core.enums.member.LevelEnum;
import com.zrqx.core.mapper.BaseMapper; import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.service.BaseServiceImpl; import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.datatype.DateUtils; import com.zrqx.core.util.datatype.DateUtils;
import com.zrqx.member.commons.model.Member;
import com.zrqx.member.commons.model.Organ; import com.zrqx.member.commons.model.Organ;
import com.zrqx.member.commons.model.OrganMember; import com.zrqx.member.commons.model.OrganMember;
import com.zrqx.member.fg.member.mapper.FgMemberMapper; import com.zrqx.member.fg.member.mapper.FgMemberMapper;
......
...@@ -12,6 +12,7 @@ import com.zrqx.member.fg.organ.service.FgOrganService; ...@@ -12,6 +12,7 @@ import com.zrqx.member.fg.organ.service.FgOrganService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import tk.mybatis.mapper.entity.Example;
@RestController @RestController
@RequestMapping("/fg/organ") @RequestMapping("/fg/organ")
...@@ -27,4 +28,13 @@ public class FgOrganController { ...@@ -27,4 +28,13 @@ public class FgOrganController {
return CallBack.success(organ); return CallBack.success(organ);
} }
@ApiOperation(value = "根据code查询", notes = "根据code查询")
@GetMapping(value = "/code")
public CallBack<Organ> getById(String code) {
Example example = new Example(Organ.class);
example.createCriteria().andEqualTo("code", code);
Organ organ = service.selectOneByExample(example);
return CallBack.success(organ);
}
} }
\ No newline at end of file
...@@ -34,6 +34,7 @@ import com.zrqx.core.client.third.WeChatLoginClient; ...@@ -34,6 +34,7 @@ import com.zrqx.core.client.third.WeChatLoginClient;
import com.zrqx.core.client.vo.third.qqlogin.QQThirdReturn; import com.zrqx.core.client.vo.third.qqlogin.QQThirdReturn;
import com.zrqx.core.client.vo.third.wechartlogin.WeChartThirdReturn; import com.zrqx.core.client.vo.third.wechartlogin.WeChartThirdReturn;
import com.zrqx.core.commons.form.LoginMemberInfo; import com.zrqx.core.commons.form.LoginMemberInfo;
import com.zrqx.core.commons.model.member.Member;
import com.zrqx.core.commons.redis.Redis; import com.zrqx.core.commons.redis.Redis;
import com.zrqx.core.enums.member.ChannelEnum; import com.zrqx.core.enums.member.ChannelEnum;
import com.zrqx.core.exception.BaseException; import com.zrqx.core.exception.BaseException;
...@@ -50,7 +51,6 @@ import com.zrqx.member.commons.form.fg.permissions.ResetPasswordForm; ...@@ -50,7 +51,6 @@ import com.zrqx.member.commons.form.fg.permissions.ResetPasswordForm;
import com.zrqx.member.commons.form.fg.permissions.SaveOMemberForm; import com.zrqx.member.commons.form.fg.permissions.SaveOMemberForm;
import com.zrqx.member.commons.form.fg.permissions.SavePMemberBindForm; import com.zrqx.member.commons.form.fg.permissions.SavePMemberBindForm;
import com.zrqx.member.commons.form.fg.permissions.SavePMemberForm; import com.zrqx.member.commons.form.fg.permissions.SavePMemberForm;
import com.zrqx.member.commons.model.Member;
import com.zrqx.member.commons.model.Organ; import com.zrqx.member.commons.model.Organ;
import com.zrqx.member.commons.model.OrganMember; import com.zrqx.member.commons.model.OrganMember;
import com.zrqx.member.fg.member.service.FgLoginLogService; import com.zrqx.member.fg.member.service.FgLoginLogService;
......
...@@ -32,7 +32,9 @@ import com.zrqx.core.client.vo.order.FgOrderVO; ...@@ -32,7 +32,9 @@ import com.zrqx.core.client.vo.order.FgOrderVO;
import com.zrqx.core.client.vo.order.OrderPayVo; import com.zrqx.core.client.vo.order.OrderPayVo;
import com.zrqx.core.client.vo.resource.DiyTypeVo; import com.zrqx.core.client.vo.resource.DiyTypeVo;
import com.zrqx.core.commons.form.LoginMemberInfo; import com.zrqx.core.commons.form.LoginMemberInfo;
import com.zrqx.core.commons.model.member.Member;
import com.zrqx.core.commons.redis.Redis; import com.zrqx.core.commons.redis.Redis;
import com.zrqx.core.components.member.RedisMember;
import com.zrqx.core.enums.member.LevelEnum; import com.zrqx.core.enums.member.LevelEnum;
import com.zrqx.core.enums.resource.author.EducationTypeEnum; import com.zrqx.core.enums.resource.author.EducationTypeEnum;
import com.zrqx.core.exception.BaseException; import com.zrqx.core.exception.BaseException;
...@@ -45,8 +47,6 @@ import com.zrqx.member.commons.form.fg.permissions.BindForm; ...@@ -45,8 +47,6 @@ import com.zrqx.member.commons.form.fg.permissions.BindForm;
import com.zrqx.member.commons.form.fg.personalcenter.UpdateMemberForm; import com.zrqx.member.commons.form.fg.personalcenter.UpdateMemberForm;
import com.zrqx.member.commons.form.fg.personalcenter.UpdatePasswordForm; import com.zrqx.member.commons.form.fg.personalcenter.UpdatePasswordForm;
import com.zrqx.member.commons.form.fg.personalcenter.UpdatePhoneForm; import com.zrqx.member.commons.form.fg.personalcenter.UpdatePhoneForm;
import com.zrqx.member.commons.model.ExpertMember;
import com.zrqx.member.commons.model.Member;
import com.zrqx.member.commons.model.Organ; import com.zrqx.member.commons.model.Organ;
import com.zrqx.member.commons.model.OrganMember; import com.zrqx.member.commons.model.OrganMember;
import com.zrqx.member.commons.model.PersonalMember; import com.zrqx.member.commons.model.PersonalMember;
...@@ -139,46 +139,21 @@ public class PersonalCenterConteroller { ...@@ -139,46 +139,21 @@ public class PersonalCenterConteroller {
@ApiOperation(value = "个人信息-修改", notes = "0:成功;") @ApiOperation(value = "个人信息-修改", notes = "0:成功;")
@PostMapping(value = "/update/member") @PostMapping(value = "/update/member")
public CallBack<String> updateMember(@RequestBody UpdateMemberForm form) { public CallBack<String> updateMember(@RequestBody UpdateMemberForm form) {
LoginMemberInfo memberInfo = redis.getMember(); RedisMember redisMember = redis.getRedisMember();
//判断是否是专家用户 //判断是否是专家用户
Member member = new Member(); Member member = new Member();
member.setId(memberInfo.getId()); member.setId(redisMember.getMember().getId());
BeanUtils.copyProperties(form, member); BeanUtils.copyProperties(form, member);
if(memberInfo.getLevel().equals(LevelEnum.EXPERT.getCode())) {
ExpertMember em = new ExpertMember();
BeanUtils.copyProperties(form, em);
em.setId(memberInfo.getId());
mService.updateByPrimaryKeySelective(member);
emService.updateByPrimaryKeySelective(em);
}
//判断是否是普通用户 //判断是否是普通用户
if(memberInfo.getLevel().equals(LevelEnum.PERSONAL.getCode())) { if(redisMember.getMember().getLevel().equals(LevelEnum.PERSONAL.getCode())) {
PersonalMember pm = new PersonalMember(); PersonalMember pm = new PersonalMember();
BeanUtils.copyProperties(form, pm); BeanUtils.copyProperties(form, pm);
pm.setId(memberInfo.getId()); pm.setId(redisMember.getMember().getId());
mService.updateByPrimaryKeySelective(member); mService.updateByPrimaryKeySelective(member);
pmService.updateByPrimaryKeySelective(pm); pmService.updateByPrimaryKeySelective(pm);
BeanUtils.copyPropertiesIgnoreNull(form, memberInfo, form); redisMember.setMember(member);
redis.set(memberInfo.getToken(), memberInfo); BeanUtils.copyPropertiesIgnoreNull(form, redisMember, form);
} redis.set(redisMember.getLoginVo().getToken(), redisMember);
return CallBack.success("");
}
@ApiOperation(value = "个人信息-修改头像", notes = "0:成功;")
@PostMapping(value = "/update/member/img")
public CallBack<String> updateMemberImg(@RequestParam("cover") String cover) {
LoginMemberInfo memberInfo = redis.getMember();
//判断是否是专家用户
Member member = new Member();
member.setId(memberInfo.getId());
memberInfo.setCover(cover);
//判断是否是普通用户
if(memberInfo.getLevel().equals(LevelEnum.PERSONAL.getCode())) {
PersonalMember pm = new PersonalMember();
pm.setId(memberInfo.getId());
pm.setCover(cover);
pmService.updateByPrimaryKeySelective(pm);
redis.set(memberInfo.getToken(), memberInfo);
} }
return CallBack.success(""); return CallBack.success("");
} }
...@@ -189,21 +164,6 @@ public class PersonalCenterConteroller { ...@@ -189,21 +164,6 @@ public class PersonalCenterConteroller {
return CallBack.success(EducationTypeEnum.getAllEnumMap()); return CallBack.success(EducationTypeEnum.getAllEnumMap());
} }
/*
* @ApiOperation(value = "账户余额-消费记录", notes = "0:成功;")
*
* @GetMapping(value = MemberRequestPath.GET+MemberRequestPath.PAY_INFO) public
* CallBack<String> getPayInfo(){
*
* return CallBack.success(""); }
*/
@ApiOperation(value = "账户安全-信息查询", notes = "0:成功;")
@GetMapping(value = "/get/safeinfo")
public CallBack<LoginMemberInfo> getInfo() {
LoginMemberInfo memberInfo = redis.getMember();
return CallBack.success(memberInfo);
}
@ApiOperation(value = "账户安全-修改密码", notes = "0:成功;") @ApiOperation(value = "账户安全-修改密码", notes = "0:成功;")
@PostMapping(value = "/update/password") @PostMapping(value = "/update/password")
public CallBack<String> updatePassword(@RequestBody UpdatePasswordForm form) throws NoSuchAlgorithmException, UnsupportedEncodingException { public CallBack<String> updatePassword(@RequestBody UpdatePasswordForm form) throws NoSuchAlgorithmException, UnsupportedEncodingException {
...@@ -241,15 +201,15 @@ public class PersonalCenterConteroller { ...@@ -241,15 +201,15 @@ public class PersonalCenterConteroller {
throw new BaseException(1, "验证码错误"); throw new BaseException(1, "验证码错误");
} }
redis.delete(form.getPhone()); redis.delete(form.getPhone());
LoginMemberInfo memberInfo = redis.getMember(); RedisMember redisMember = redis.getRedisMember();
// 修改手机号 // 修改手机号
Member m = new Member(); Member m = new Member();
m.setId(memberInfo.getId()); m.setId(redisMember.getMember().getId());
m.setPhone(form.getPhone()); m.setPhone(form.getPhone());
mService.updateByPrimaryKeySelective(m); mService.updateByPrimaryKeySelective(m);
// 更新redis // 更新redis
memberInfo.setPhone(form.getPhone()); redisMember.setMember(m);
redis.set(memberInfo.getToken(), memberInfo); redis.set(redisMember.getLoginVo().getToken(), redisMember);
return CallBack.success("成功"); return CallBack.success("成功");
} }
...@@ -261,8 +221,8 @@ public class PersonalCenterConteroller { ...@@ -261,8 +221,8 @@ public class PersonalCenterConteroller {
String code = PasswordUtil.createPassword(6, 1); String code = PasswordUtil.createPassword(6, 1);
ssf.setContent("您的验证码是:" + code + ",在5分钟内有效。如非本人操作请忽略本短信。"); ssf.setContent("您的验证码是:" + code + ",在5分钟内有效。如非本人操作请忽略本短信。");
CallBack<String> sms = sdkSmsClient.send(ssf); CallBack<String> sms = sdkSmsClient.send(ssf);
LoginMemberInfo memberInfo = redis.getMember(); RedisMember redisMember = redis.getRedisMember();
if(phone.equals(memberInfo.getPhone())) { if(phone.equals(redisMember.getMember().getPhone())) {
throw new BaseException(15, "不能修改成当前手机号"); throw new BaseException(15, "不能修改成当前手机号");
} }
Example example = mService.createExample(); Example example = mService.createExample();
...@@ -300,20 +260,20 @@ public class PersonalCenterConteroller { ...@@ -300,20 +260,20 @@ public class PersonalCenterConteroller {
@ApiOperation(value = "账户安全-解除绑定 1:qq;2:微信", notes = "0:成功;") @ApiOperation(value = "账户安全-解除绑定 1:qq;2:微信", notes = "0:成功;")
@PostMapping(value = "/unbind/{type}") @PostMapping(value = "/unbind/{type}")
public CallBack<String> unbind(@PathVariable("type") int type) throws IOException { public CallBack<String> unbind(@PathVariable("type") int type) throws IOException {
LoginMemberInfo memberInfo = redis.getMember(); RedisMember redisMember = redis.getRedisMember();
Member member = new Member(); Member member = new Member();
member.setId(memberInfo.getId()); member.setId(redisMember.getMember().getId());
if (type == 1) { if (type == 1) {
member.setQqKey(""); member.setQqKey("");
memberInfo.setQqKey(""); redisMember.getMember().setQqKey("");
} }
if (type == 2) { if (type == 2) {
member.setWechatKey(""); member.setWechatKey("");
memberInfo.setWechatKey("");; redisMember.getMember().setWechatKey("");;
} }
mService.updateByPrimaryKeySelective(member); mService.updateByPrimaryKeySelective(member);
// 更新redis // 更新redis
redis.set(memberInfo.getToken(), memberInfo); redis.set(redisMember.getLoginVo().getToken(), redisMember);
return CallBack.success("成功"); return CallBack.success("成功");
} }
...@@ -323,22 +283,22 @@ public class PersonalCenterConteroller { ...@@ -323,22 +283,22 @@ public class PersonalCenterConteroller {
if (StringUtils.isBlank(form.getQqKey()) && StringUtils.isBlank(form.getWechatKey())) { if (StringUtils.isBlank(form.getQqKey()) && StringUtils.isBlank(form.getWechatKey())) {
throw new BaseException(9, "第三方账号不能为空"); throw new BaseException(9, "第三方账号不能为空");
} }
LoginMemberInfo memberInfo = redis.getMember(); RedisMember redisMember = redis.getRedisMember();
Member member = new Member(); Member member = new Member();
member.setId(memberInfo.getId()); member.setId(redisMember.getMember().getId());
if (StringUtils.isNotBlank(form.getQqKey())) { if (StringUtils.isNotBlank(form.getQqKey())) {
member.setQqKey(form.getQqKey()); member.setQqKey(form.getQqKey());
memberInfo.setQqKey(form.getQqKey()); redisMember.getMember().setQqKey(form.getQqKey());
} }
if (StringUtils.isNotBlank(form.getWechatKey())) { if (StringUtils.isNotBlank(form.getWechatKey())) {
member.setWechatKey(form.getWechatKey()); member.setWechatKey(form.getWechatKey());
memberInfo.setWechatKey(form.getQqKey()); redisMember.getMember().setWechatKey(form.getQqKey());
} }
if (!mService.updateByPrimaryKeySelective(member)) { if (!mService.updateByPrimaryKeySelective(member)) {
throw new BaseException("绑定失败!"); throw new BaseException("绑定失败!");
} }
// 更新redis // 更新redis
redis.set(memberInfo.getToken(), memberInfo); redis.set(redisMember.getLoginVo().getToken(), redisMember);
return CallBack.success("绑定成功"); return CallBack.success("绑定成功");
} }
...@@ -383,7 +343,7 @@ public class PersonalCenterConteroller { ...@@ -383,7 +343,7 @@ public class PersonalCenterConteroller {
} else{ } else{
try { try {
String token = form.getToken(); String token = form.getToken();
LoginMemberInfo info = redis.getInfoObjectRedis(token, LoginMemberInfo.class); RedisMember info = redis.getInfoObjectRedis(token, RedisMember.class);
info.setVip(1); info.setVip(1);
redis.set(token, info); redis.set(token, info);
} catch (Exception e1) { } catch (Exception e1) {
...@@ -434,9 +394,13 @@ public class PersonalCenterConteroller { ...@@ -434,9 +394,13 @@ public class PersonalCenterConteroller {
* *
* @return * @return
*/ */
@Scheduled(cron = "0 0 0 * * ?") @Scheduled(cron = "0 0 0 /1 * ?")
@ApiOperation(value = "修改vip状态)", notes = "修改vip状态")
@PostMapping(value = "/update/vip/status")
public CallBack<Boolean> updateVipMember() { public CallBack<Boolean> updateVipMember() {
List<PersonalMember> pmList = pmService.selectAll(); Example example = new Example(PersonalMember.class);
example.createCriteria().andEqualTo("vip", 1);
List<PersonalMember> pmList = pmService.selectByExample(example);
pmList.forEach(pm -> { pmList.forEach(pm -> {
if (pm.getEndTime() != null) { if (pm.getEndTime() != null) {
if (pm.getEndTime().before(new Date())) { if (pm.getEndTime().before(new Date())) {
......
...@@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -9,7 +9,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.zrqx.core.commons.form.LoginMemberInfo; import com.zrqx.core.commons.model.member.Member;
import com.zrqx.core.commons.redis.Redis; import com.zrqx.core.commons.redis.Redis;
import com.zrqx.core.enums.ResponseCodeEnum; import com.zrqx.core.enums.ResponseCodeEnum;
import com.zrqx.core.exception.BaseException; import com.zrqx.core.exception.BaseException;
...@@ -106,7 +106,7 @@ public class FgPrivateMessageController { ...@@ -106,7 +106,7 @@ public class FgPrivateMessageController {
if(StringUtils.isBlank(pageParam.getOrderBy())){ if(StringUtils.isBlank(pageParam.getOrderBy())){
pageParam.setOrderBy("sendTime desc"); pageParam.setOrderBy("sendTime desc");
} }
LoginMemberInfo info = redis.getMember(); Member info = redis.getMember();
if(info == null) { if(info == null) {
throw new BaseException("未登录"); throw new BaseException("未登录");
} }
......
package com.zrqx.member.fg.pmember.service; package com.zrqx.member.fg.pmember.service;
import com.zrqx.core.commons.model.member.Member;
import com.zrqx.core.service.BaseService; import com.zrqx.core.service.BaseService;
import com.zrqx.member.commons.model.Member;
import com.zrqx.member.commons.model.PersonalMember; import com.zrqx.member.commons.model.PersonalMember;
public interface FgPersonalMemberService extends BaseService<PersonalMember, String> { public interface FgPersonalMemberService extends BaseService<PersonalMember, String> {
......
...@@ -4,11 +4,11 @@ import org.apache.commons.lang3.StringUtils; ...@@ -4,11 +4,11 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zrqx.core.commons.model.member.Member;
import com.zrqx.core.enums.member.LevelEnum; import com.zrqx.core.enums.member.LevelEnum;
import com.zrqx.core.mapper.BaseMapper; import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.service.BaseServiceImpl; import com.zrqx.core.service.BaseServiceImpl;
import com.zrqx.core.util.datatype.DateUtils; import com.zrqx.core.util.datatype.DateUtils;
import com.zrqx.member.commons.model.Member;
import com.zrqx.member.commons.model.PersonalMember; import com.zrqx.member.commons.model.PersonalMember;
import com.zrqx.member.fg.member.mapper.FgMemberMapper; import com.zrqx.member.fg.member.mapper.FgMemberMapper;
import com.zrqx.member.fg.pmember.mapper.FgPersonalMemberMapper; import com.zrqx.member.fg.pmember.mapper.FgPersonalMemberMapper;
......
...@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.zrqx.core.exception.BaseException; import com.zrqx.core.exception.BaseException;
...@@ -15,6 +16,7 @@ import com.zrqx.member.fg.organ.service.FgOrganService; ...@@ -15,6 +16,7 @@ import com.zrqx.member.fg.organ.service.FgOrganService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import tk.mybatis.mapper.entity.Example;
/** /**
* 服务间调用的服务Controller * 服务间调用的服务Controller
*/ */
...@@ -39,4 +41,17 @@ public class ServiceController { ...@@ -39,4 +41,17 @@ public class ServiceController {
} }
@ApiOperation(value = "根据机构code查询机构的关联资源", notes = "0:成功;1:机构不存在;")
@GetMapping(value = "/organ/diytypes/code")
CallBack<String> getCurrentOrganByMemberCode(@RequestParam("code")String code){
Example example = new Example(Organ.class);
example.createCriteria().andEqualTo("code", code);
Organ organ = oService.selectOneByExample(example);
if(organ == null) {
throw new BaseException(1,"机构不存在");
}
return CallBack.success(organ.getRelatedResourceTypes());
}
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论