Commit 5a31db5e authored by zjy's avatar zjy

user/role/tright 5.31

还需要调用其他服务
需要增加手机验证码
parent dab8c990
......@@ -4,6 +4,7 @@ package com.pangding.web.authority.controller;
import com.pangding.web.authority.service.AuthorityService;
import com.pangding.web.authority.vo.AuthorityVo;
import com.pangding.web.authority.vo.reqvo.*;
import com.pangding.web.authority.vo.resvo.AuthorityResVo;
import com.pangding.web.authority.vo.resvo.WebAuthorityResVo;
import com.yanzuoguang.util.helper.CheckerHelper;
import com.yanzuoguang.util.vo.PageSizeData;
......@@ -83,13 +84,13 @@ public class AuthorityController {
}
/**
* 查询一级权限
* 按等级返回权限列表
* @param reqVo
* @return
*/
@RequestMapping(value = "/firstLevel", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseResult<PageSizeData<WebAuthorityResVo>> parentAuthoritys(ListAuthorityByPageReqVo reqVo){
reqVo.setLevelOne("one");
return ResponseResult.result(authorityServiceImpl.getWebAuthorityResVoList(reqVo));
@RequestMapping(value = "/listByLevel", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseResult listByLevel(@RequestBody AuthorityListReqVo reqVo){
return ResponseResult.result(authorityServiceImpl.getListByLevel(reqVo));
}
/**
......@@ -98,7 +99,7 @@ public class AuthorityController {
* @return
*/
@RequestMapping(value = "/role", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseResult<AuthorityVo> authority(@RequestBody WebAuthorityReqVo reqVo){
public ResponseResult<AuthorityResVo> authority(@RequestBody WebAuthorityReqVo reqVo){
CheckerHelper.newInstance()
.notBlankCheck("anthorityId",reqVo.getId())
.checkException();
......@@ -117,7 +118,14 @@ public class AuthorityController {
.checkException();
authorityServiceImpl.deleteAuthorityById(reqVo);
return new ResponseResult();
}
@RequestMapping(value = "/companyAuthority", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseResult companyAuthority(@RequestBody CompanyAuthorityReqVo reqVo){
CheckerHelper.newInstance()
.notBlankCheck("companyId",reqVo.getCompanyId())
.checkException();
return ResponseResult.result(authorityServiceImpl.getCompanyAuthority(reqVo));
}
}
......
......@@ -55,8 +55,17 @@ public class CompanyController {
return ResponseResult.result(companyServiceImpl.saveCompany(reqVo));
}
@RequestMapping(value = "/deleteCompany", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseResult deleteCompany(@RequestBody DeleteCompanyReqVo reqVo){
CheckerHelper.newInstance()
.notBlankCheck("companyId",reqVo.getCompanyId())
.checkException();
companyServiceImpl.deleteCompany(reqVo);
return new ResponseResult();
}
/**y
* 保存银行卡信息,并调用第三方接口发送手机验证码
* 保存/修改银行卡信息,并调用第三方接口发送手机验证码
*
* @param reqVo 公司银行卡表信息
* @return 银行卡表主键
......@@ -76,15 +85,6 @@ public class CompanyController {
return new ResponseResult();
}
@RequestMapping(value = "/updateBank", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseResult<String> updateBank(@RequestBody CompanyBankCardVo reqVo){
checkBank(reqVo);
CheckerHelper.newInstance()
.notBlankCheck("bankCardId",reqVo.getId())
.checkException();
return ResponseResult.result(companyServiceImpl.updateBank(reqVo));
}
private void checkBank(CompanyBankCardVo reqVo){
CheckerHelper.newInstance()
.notBlankCheck("bankCardCode",reqVo.getBankCardCode())
......@@ -142,6 +142,11 @@ public class CompanyController {
return ResponseResult.result(companyServiceImpl.list(reqVo));
}
@RequestMapping(value = "/productOrInterface", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseResult productOrInterface(@RequestBody ProductOrInterfaceReqVo reqVo){
return ResponseResult.result(companyServiceImpl.productOrInterface(reqVo));
}
/**y
* 胖丁查询用户,公司和公司扩展表信息以及银行卡列表
* @param reqVo 包含公司id的请求对象
......
......@@ -129,4 +129,5 @@ public class ComputerRegisterController {
String verifyCode = registerServiceImpl.enterpriceSubmit(reqVo);
return ResponseResult.result(verifyCode);
}
}
package com.pangding.web.authority.controller;
import com.pangding.web.authority.service.IndexService;
import com.pangding.web.authority.vo.reqvo.TotalIncomeReqVo;
import com.pangding.web.authority.vo.reqvo.UserPrecipitationReqVo;
import com.pangding.web.authority.vo.reqvo.WithdrawCashReqVo;
import com.pangding.web.authority.vo.reqvo.*;
import com.yanzuoguang.util.helper.CheckerHelper;
import com.yanzuoguang.util.vo.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -63,4 +61,46 @@ public class IndexController {
.checkException();
return ResponseResult.result(indexServiceImpl.getUserPrecipitation(reqVo));
}
/**
* 通过公司id获取该公司今日实收金额
* @param reqVo 封装了公司id的请求对象
* @return 今日实收金额
*/
@PostMapping(value = "/todayIncome", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseResult todayIncome(@RequestBody TodayIncomeReqVo reqVo){
CheckerHelper.newInstance()
.notBlankCheck("companyId",reqVo.getId())
.checkException();
return ResponseResult.result(indexServiceImpl.getTodayIncome(reqVo));
}
/**
* 通过公司id获取该公司的跨界盈利
* @param reqVo 封装了公司id的请求对象
* @return 跨界盈利
*/
@PostMapping(value = "/transboundaryProfit", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseResult transboundaryProfit(@RequestBody TransboundaryProfitReqVo reqVo){
CheckerHelper.newInstance()
.notBlankCheck("companyId",reqVo.getId())
.checkException();
return ResponseResult.result(indexServiceImpl.getTransboundaryProfit(reqVo));
}
@PostMapping(value = "/userTrending", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseResult userTrending(@RequestBody UserTrendingReqVo reqVo){
CheckerHelper.newInstance()
.notBlankCheck("companyId",reqVo.getId())
.checkException();
return ResponseResult.result(indexServiceImpl.getUserTrending(reqVo));
}
@PostMapping(value = "/fundTrending", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseResult fundTrending(@RequestBody FundTrendingReqVo reqVo){
CheckerHelper.newInstance()
.notBlankCheck("companyId",reqVo.getId())
.checkException();
return ResponseResult.result(indexServiceImpl.getFundTrending(reqVo));
}
}
......@@ -47,7 +47,7 @@ public class LoginController {
.checkException();
LoginResVo resVo = registerServiceImpl.login(reqVo);
ResponseResult result = new ResponseResult();
if (LoginConstant.PERSONAL_NOT_FINISH_BASIC_INFO.equals(resVo.getCode())){
/*if (LoginConstant.PERSONAL_NOT_FINISH_BASIC_INFO.equals(resVo.getCode())){
result.setCode("01");
result.setMessage("个人基本信息未完善,跳转个人完善页面");
result.setData(reqVo);
......@@ -67,8 +67,8 @@ public class LoginController {
result.setMessage("未签约,跳转签约页面");
result.setData(reqVo);
return result;
}
return ResponseResult.result(registerServiceImpl.login(reqVo));
}*/
return ResponseResult.result(resVo);
}
/*@RequestMapping(value = "/computer", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
......
package com.pangding.web.authority.dao;
import com.pangding.web.authority.vo.AuthorityVo;
import com.pangding.web.authority.vo.reqvo.AuthorityListReqVo;
import com.pangding.web.authority.vo.reqvo.ListAuthorityByPageReqVo;
import com.yanzuoguang.dao.BaseDao;
import com.yanzuoguang.util.vo.PageSizeData;
import java.util.List;
/**
* @author zhangjinyao
*/
......@@ -25,4 +28,6 @@ public interface AuthorityDao extends BaseDao {
*/
PageSizeData<AuthorityVo> getAuthorityList(ListAuthorityByPageReqVo reqVo);
List<AuthorityVo> getLevelOne(AuthorityListReqVo reqVo);
}
......@@ -3,6 +3,7 @@ package com.pangding.web.authority.dao;
import com.pangding.web.authority.vo.UserVo;
import com.pangding.web.authority.vo.reqvo.ListUserReqVo;
import com.pangding.web.authority.vo.reqvo.UserGetReqVo;
import com.pangding.web.authority.vo.reqvo.UserGetSuperAdminReqVo;
import com.yanzuoguang.dao.BaseDao;
import com.yanzuoguang.util.vo.PageSizeData;
......@@ -53,4 +54,6 @@ public interface UserDao extends BaseDao {
* @return 用户分页对象
*/
PageSizeData<UserVo> getUserVoList(ListUserReqVo reqVo);
UserVo getSuperAdmin(UserGetSuperAdminReqVo reqVo);
}
package com.pangding.web.authority.dao;
import com.pangding.web.authority.vo.WechatUserVo;
import com.pangding.web.authority.vo.reqvo.WechatUserGetReqVo;
import com.yanzuoguang.dao.BaseDao;
import java.util.List;
/**
* @Author zhangjinyao
* @create 2019/5/29 17:10
*/
public interface WechatUserDao extends BaseDao {
/**
* 通过公司id获取该公司的用户沉淀
* @param reqVo 封装了公司id的请求对象
* @return 用户沉淀量
* 根据公司id,和月份获取该公司该月增加的用户数
* @param getReqVo
* @return
*/
int getUserPrecipitation(WechatUserGetReqVo reqVo);
Object getUserNumByMonth(WechatUserGetReqVo getReqVo);
}
......@@ -2,11 +2,14 @@ package com.pangding.web.authority.dao.impl;
import com.pangding.web.authority.dao.AuthorityDao;
import com.pangding.web.authority.vo.AuthorityVo;
import com.pangding.web.authority.vo.reqvo.AuthorityListReqVo;
import com.pangding.web.authority.vo.reqvo.ListAuthorityByPageReqVo;
import com.yanzuoguang.dao.impl.BaseDaoImpl;
import com.yanzuoguang.util.vo.PageSizeData;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @author zhangjinyao
*/
......@@ -15,6 +18,7 @@ public class AuthorityDaoImpl extends BaseDaoImpl implements AuthorityDao {
private static final String CHECK_VALID = "CHECK_VALID";
private static final String SELECT = "SELECT";
private static final String GET_LEVEL_ONE = "GET_LEVEL_ONE";
@Override
protected void init() {
......@@ -25,8 +29,11 @@ public class AuthorityDaoImpl extends BaseDaoImpl implements AuthorityDao {
table.add(SELECT,"select * from pd_authority where 1=1")
.add("id","and pid = ? ")
.add("pid","and pid = ? ")
.add("sort","and sort = ?")
.add("levelOne","and pid = ''");
.add("sort","and sort = ? ")
.add("levelOne","and pid = '' ");
table.add(GET_LEVEL_ONE,"select * from pd_authority where 1=1 ")
.add("levelOne","and pid = '' ");
}
/**
......@@ -50,4 +57,8 @@ public class AuthorityDaoImpl extends BaseDaoImpl implements AuthorityDao {
return this.queryPage(AuthorityVo.class,reqVo,SELECT,reqVo);
}
@Override
public List<AuthorityVo> getLevelOne(AuthorityListReqVo reqVo) {
return this.query(AuthorityVo.class,GET_LEVEL_ONE,reqVo);
}
}
......@@ -24,7 +24,11 @@ public class CompanyDaoImpl extends BaseDaoImpl implements CompanyDao {
table.addExist(CHECK_PHONE,"contact_phone");
table.add("SELECT","select * from pd_company where 1=1 ");
table.add(SELECT,"select * from pd_company where 1=1 ")
.add("companyName","and company_name = ? ")
.add("companyType","and company_type = ? ")
.add("companyAttribute","and company_attribute = ? ")
.add("status","and status = ?");
}
@Override
......
......@@ -4,6 +4,7 @@ import com.pangding.web.authority.dao.UserDao;
import com.pangding.web.authority.vo.UserVo;
import com.pangding.web.authority.vo.reqvo.ListUserReqVo;
import com.pangding.web.authority.vo.reqvo.UserGetReqVo;
import com.pangding.web.authority.vo.reqvo.UserGetSuperAdminReqVo;
import com.yanzuoguang.dao.impl.BaseDaoImpl;
import com.yanzuoguang.util.vo.PageSizeData;
import org.springframework.stereotype.Component;
......@@ -20,6 +21,7 @@ public class UserDaoImpl extends BaseDaoImpl implements UserDao {
private static final String SELECT = "SELECT";
private static final String CHECK_ACCOUNT = "CHECK_ACCOUNT";
private static final String CHECK_PHONE = "CHECK_PHONE";
private static final String GET_SUPER_ADMIN = "GET_SUPER_ADMIN";
@Override
protected void init() {
......@@ -31,6 +33,10 @@ public class UserDaoImpl extends BaseDaoImpl implements UserDao {
table.addExist(CHECK_PHONE,"phone");
table.add(GET_SUPER_ADMIN,"SELECT u.* FROM pd_user u,pd_user_role ur WHERE u.id = ur.user_id")
.add("superAdminRoleId","and ur.role_id = ?")
.add("companyId","and u.company_id = ? ");
}
@Override
......@@ -57,4 +63,9 @@ public class UserDaoImpl extends BaseDaoImpl implements UserDao {
public PageSizeData<UserVo> getUserVoList(ListUserReqVo reqVo) {
return this.queryPage(UserVo.class,reqVo,SELECT,reqVo);
}
@Override
public UserVo getSuperAdmin(UserGetSuperAdminReqVo reqVo) {
return this.queryFirst(UserVo.class,GET_SUPER_ADMIN,reqVo);
}
}
......@@ -4,31 +4,32 @@ import com.pangding.web.authority.dao.WechatUserDao;
import com.pangding.web.authority.vo.WechatUserVo;
import com.pangding.web.authority.vo.reqvo.WechatUserGetReqVo;
import com.yanzuoguang.dao.impl.BaseDaoImpl;
import com.yanzuoguang.util.vo.MapRow;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @Author zhangjinyao
* @create 2019/5/29 17:13
*/
@Component
public class WechatUserDaoImpl extends BaseDaoImpl implements WechatUserDao {
private static final String GET_USER_PRECIPITATION = "GET_USER_PRECIPITATION";
private static final String GET_USER_NUM_BY_MONTH = "GET_USER_NUM_BY_MONTH";
@Override
protected void init() {
register(WechatUserVo.class);
table.add(GET_USER_PRECIPITATION,"select count(company_id) from pd_wechat_user where 1=1 ")
.add("companyId","and company_id = ?");
table.add(GET_USER_NUM_BY_MONTH,"select count(id) as num from pd_wechat_user where 1=1 ")
.add("companyId","and company_id = ? ")
.add("start","and follow_time >= ? ")
.add("end","and follow_time < ? ");
}
/**
* 通过公司id获取该公司的用户沉淀量
* @param reqVo 封装了公司id的请求对象
* @return 用户沉淀量
*/
@Override
public int getUserPrecipitation(WechatUserGetReqVo reqVo) {
return this.queryFirst(int.class,GET_USER_PRECIPITATION,reqVo);
public Object getUserNumByMonth(WechatUserGetReqVo getReqVo) {
return this.query(GET_USER_NUM_BY_MONTH,getReqVo);
}
}
......@@ -2,6 +2,8 @@ package com.pangding.web.authority.service;
import com.pangding.web.authority.vo.AuthorityVo;
import com.pangding.web.authority.vo.reqvo.*;
import com.pangding.web.authority.vo.resvo.AuthorityListByLevelResVo;
import com.pangding.web.authority.vo.resvo.AuthorityResVo;
import com.pangding.web.authority.vo.resvo.WebAuthorityResVo;
import com.yanzuoguang.util.vo.PageSizeData;
......@@ -33,7 +35,7 @@ public interface AuthorityService {
* @param reqVo 主键
* @return authorityVo对象
*/
AuthorityVo getAuthorityById(WebAuthorityReqVo reqVo);
AuthorityResVo getAuthorityById(WebAuthorityReqVo reqVo);
/**
* 通过权限表主键删除authorityVo对象,并删除权限和角色的对应关系
......@@ -66,4 +68,8 @@ public interface AuthorityService {
*/
List<AuthorityVo> getAuthorityList(AuthorityListReqVo reqVo);
List<AuthorityListByLevelResVo> getListByLevel(AuthorityListReqVo reqVo);
List<AuthorityListByLevelResVo> getCompanyAuthority(CompanyAuthorityReqVo reqVo);
}
......@@ -8,6 +8,8 @@ import com.pangding.web.authority.vo.resvo.CompanyResVo;
import com.pangding.web.authority.vo.resvo.DetailResVo;
import com.yanzuoguang.util.vo.PageSizeData;
import java.util.List;
/**
* @author Administrator
*/
......@@ -33,6 +35,8 @@ public interface CompanyService{
*/
CompanyResVo pdGetDetail(CompanyGetReqVo reqVo);
List<CompanyVo> productOrInterface(ProductOrInterfaceReqVo reqVo);
/**
* 商户查看详情,根据公司id返回用户信息和公司主表信息
* @param reqVo 包含公司id的请求对象
......@@ -47,6 +51,8 @@ public interface CompanyService{
*/
CompanyVo saveCompany(CompanyAndCompanyExtendSaveReqVo reqVo);
void deleteCompany(DeleteCompanyReqVo reqVo);
/**
* 保存银行卡信息,并调用第三方接口发送手机验证码
*
......@@ -57,9 +63,7 @@ public interface CompanyService{
void deleteBank(CompanyBankCardVo reqVo);
String updateBank(CompanyBankCardVo reqVo);
/**
/**
* 提交银行卡信息,验证手机验证码,并更新银行卡状态
* @param reqVo 银行卡表数据+验证码
* @return 目前返回验证码
......
package com.pangding.web.authority.service;
import com.pangding.web.authority.vo.reqvo.TotalIncomeReqVo;
import com.pangding.web.authority.vo.reqvo.UserPrecipitationReqVo;
import com.pangding.web.authority.vo.reqvo.WithdrawCashReqVo;
import com.pangding.web.authority.vo.reqvo.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @Author zhangjinyao
......@@ -30,5 +30,23 @@ public interface IndexService {
* @param reqVo 封装了公司id的请求对象
* @return 用户沉淀量
*/
int getUserPrecipitation(UserPrecipitationReqVo reqVo);
Integer getUserPrecipitation(UserPrecipitationReqVo reqVo);
/**
* 通过公司id获取该公司今日实收金额
* @param reqVo 封装了公司id的请求对象
* @return 今日实收金额
*/
BigDecimal getTodayIncome(TodayIncomeReqVo reqVo);
/**
* 通过公司id获取该公司的跨界盈利
* @param reqVo 封装了公司id的请求对象
* @return 跨界盈利
*/
String getTransboundaryProfit(TransboundaryProfitReqVo reqVo);
List<Long> getUserTrending(UserTrendingReqVo reqVo);
Object getFundTrending(FundTrendingReqVo reqVo);
}
......@@ -2,9 +2,14 @@ package com.pangding.web.authority.service.impl;
import com.pangding.web.authority.dao.RoleAuthorityDao;
import com.pangding.web.authority.dao.AuthorityDao;
import com.pangding.web.authority.dao.UserDao;
import com.pangding.web.authority.dao.UserRoleDao;
import com.pangding.web.authority.util.RoleConstant;
import com.pangding.web.authority.vo.reqvo.*;
import com.pangding.web.authority.service.AuthorityService;
import com.pangding.web.authority.vo.*;
import com.pangding.web.authority.vo.resvo.AuthorityListByLevelResVo;
import com.pangding.web.authority.vo.resvo.AuthorityResVo;
import com.pangding.web.authority.vo.resvo.WebAuthorityResVo;
import com.yanzuoguang.util.base.ObjectHelper;
import com.yanzuoguang.util.exception.CodeException;
......@@ -25,9 +30,12 @@ public class AuthorityServiceImpl implements AuthorityService {
@Autowired
AuthorityDao authorityDao;
@Autowired
RoleAuthorityDao roleAuthorityDao;
@Autowired
UserDao userDaoImpl;
@Autowired
UserRoleDao userRoleDaoImpl;
/**
* 保存authorityVo对象数据
......@@ -40,8 +48,8 @@ public class AuthorityServiceImpl implements AuthorityService {
this.checkValid(authorityVo);
if (null != authorityVo.getPid() && !authorityVo.getPid().isEmpty()){
authorityVo.setPid("");
checkSort(authorityVo);
}
checkSort(authorityVo);
authorityVo.setId(StringHelper.getNewID());
authorityDao.create(authorityVo);
return authorityVo.getId();
......@@ -72,8 +80,8 @@ public class AuthorityServiceImpl implements AuthorityService {
this.checkValid(authorityVo);
if (null != authorityVo.getPid() && !authorityVo.getPid().isEmpty()){
authorityVo.setPid("");
checkSort(authorityVo);
}
checkSort(authorityVo);
authorityDao.update(authorityVo);
return authorityVo.getId();
}
......@@ -96,14 +104,26 @@ public class AuthorityServiceImpl implements AuthorityService {
* @return authorityVo对象
*/
@Override
public AuthorityVo getAuthorityById(WebAuthorityReqVo reqVo) {
public AuthorityResVo getAuthorityById(WebAuthorityReqVo reqVo) {
AuthorityGetReqVo authorityGetReqVo = new AuthorityGetReqVo();
authorityGetReqVo.setId(reqVo.getId());
AuthorityVo authorityVo = authorityDao.load(authorityGetReqVo,AuthorityVo.class);
if (authorityVo == null){
throw new CodeException("该权限不存在");
}
return authorityVo;
AuthorityResVo resVo = new AuthorityResVo();
ObjectHelper.writeWithFrom(resVo,authorityVo);
if (null != authorityVo.getPid() && !authorityVo.getPid().isEmpty()){
AuthorityGetReqVo getReqVo = new AuthorityGetReqVo();
getReqVo.setId(authorityVo.getPid());
AuthorityVo parent = authorityDao.load(getReqVo,AuthorityVo.class);
if (null != parent){
resVo.setParentName(parent.getName());
}
}
return resVo;
}
/**
......@@ -177,4 +197,86 @@ public class AuthorityServiceImpl implements AuthorityService {
}
return authorityVoList;
}
@Override
public List<AuthorityListByLevelResVo> getListByLevel(AuthorityListReqVo reqVo) {
List<AuthorityVo> parentList = authorityDao.getLevelOne(reqVo);
if (null == parentList || parentList.isEmpty()){
throw new CodeException("暂无一级权限,请添加");
}
List<AuthorityListByLevelResVo> resVoList = new ArrayList();
for (AuthorityVo authorityVo:parentList) {
AuthorityListByLevelResVo resVo = new AuthorityListByLevelResVo();
ObjectHelper.writeWithFrom(resVo,authorityVo);
List<AuthorityListByLevelResVo> childList = getChildList(authorityVo.getId());
resVo.setChildList(childList);
resVoList.add(resVo);
}
return resVoList;
}
private List<AuthorityListByLevelResVo> getChildList(String id){
AuthorityGetReqVo reqVo = new AuthorityGetReqVo();
reqVo.setPid(id);
List<AuthorityVo> childList = authorityDao.loadList(reqVo,AuthorityVo.class);
List<AuthorityListByLevelResVo> childResList = new ArrayList();
if (null != childList && !childList.isEmpty()){
for (AuthorityVo authorityVo:childList) {
AuthorityListByLevelResVo resVo = new AuthorityListByLevelResVo();
ObjectHelper.writeWithFrom(resVo,authorityVo);
List<AuthorityListByLevelResVo> grandchildList = getChildList(authorityVo.getId());
resVo.setChildList(grandchildList);
childResList.add(resVo);
}
}
return childResList;
}
@Override
public List<AuthorityListByLevelResVo> getCompanyAuthority(CompanyAuthorityReqVo reqVo) {
UserGetSuperAdminReqVo userGetSuperAdminReqVo = new UserGetSuperAdminReqVo();
userGetSuperAdminReqVo.setCompanyId(reqVo.getCompanyId());
userGetSuperAdminReqVo.setSuperAdminRoleId(RoleConstant.SUPER_ADMIN_ROLE_ID);
UserVo superAdmin = userDaoImpl.getSuperAdmin(userGetSuperAdminReqVo);
if (null == superAdmin){
throw new CodeException("暂无超级管理员");
}
UserRoleGetReqVo getReqVo = new UserRoleGetReqVo();
getReqVo.setUserId(superAdmin.getId());
List<UserRoleVo> userRoleVoList = userRoleDaoImpl.loadList(getReqVo,UserRoleVo.class);
if (null == userRoleVoList || userRoleVoList.isEmpty()){
throw new CodeException("暂无权限");
}
List<RoleAuthorityVo> roleAuthorityVoList = new ArrayList();
for (UserRoleVo userRoleVo:userRoleVoList) {
RoleAuthorityGetReqVo roleAuthorityGetReqVo = new RoleAuthorityGetReqVo();
roleAuthorityGetReqVo.setRoleId(userRoleVo.getRoleId());
List<RoleAuthorityVo> roleAuthorityVos = roleAuthorityDao.loadList(roleAuthorityGetReqVo,RoleAuthorityVo.class);
roleAuthorityVoList.addAll(roleAuthorityVos);
}
if (null == roleAuthorityVoList || roleAuthorityVoList.isEmpty()){
throw new CodeException("暂无权限");
}
List<AuthorityVo> authorityVoList = new ArrayList();
for (RoleAuthorityVo roleAuthorityVo:roleAuthorityVoList) {
AuthorityGetReqVo authorityGetReqVo = new AuthorityGetReqVo();
authorityGetReqVo.setId(roleAuthorityVo.getAuthorityId());
AuthorityVo authorityVo = authorityDao.load(authorityGetReqVo,AuthorityVo.class);
if (authorityVo != null){
authorityVoList.add(authorityVo);
}
}
if (null == authorityVoList || authorityVoList.isEmpty()){
throw new CodeException("暂无权限");
}
List<AuthorityListByLevelResVo> resVoList = new ArrayList();
for (AuthorityVo authorityVo:authorityVoList) {
AuthorityListByLevelResVo resVo = new AuthorityListByLevelResVo();
ObjectHelper.writeWithFrom(resVo,authorityVo);
List<AuthorityListByLevelResVo> childList = getChildList(authorityVo.getId());
resVo.setChildList(childList);
resVoList.add(resVo);
}
return resVoList;
}
}
......@@ -7,6 +7,7 @@ import com.pangding.web.authority.dao.UserDao;
import com.pangding.web.authority.service.CompanyService;
import com.pangding.web.authority.service.UserService;
import com.pangding.web.authority.util.CompanyBankCardConstant;
import com.pangding.web.authority.util.CompanyConstant;
import com.pangding.web.authority.vo.CompanyBankCardVo;
import com.pangding.web.authority.vo.CompanyExtendVo;
import com.pangding.web.authority.vo.CompanyVo;
......@@ -151,10 +152,16 @@ public class CompanyServiceImpl implements CompanyService{
if (null == reqVo.getId() || reqVo.getId().isEmpty()){
/*保存公司表*/
/*此处需要生成二维码源码*/
String qrCode = DateHelper.getNow()
.replace("-","")
.replace(":","")
.replace(" ","");
companyVo.setId(id);
companyDao.create(companyVo);
/*保存公司扩展表*/
companyExtendVo.setId(id);
companyExtendVo.setQrCode(qrCode);
companyExtendDaoImpl.create(companyExtendVo);
}
/*修改*/
......@@ -168,6 +175,15 @@ public class CompanyServiceImpl implements CompanyService{
return companyVo;
}
@Override
public void deleteCompany(DeleteCompanyReqVo reqVo) {
/*仅修改公司状态status,不删除数据*/
CompanyVo companyVo = new CompanyVo();
companyVo.setId(reqVo.getCompanyId());
companyVo.setStatus(CompanyConstant.COMPANY_STATUS_STOP);
companyDao.update(companyVo);
}
/**
* 保存/更新银行卡信息,并调用第三方接口发送手机验证码
*
......@@ -181,10 +197,12 @@ public class CompanyServiceImpl implements CompanyService{
/*若该卡存在,则修改*/
CompanyBankCardGetReqVo getReqVo = new CompanyBankCardGetReqVo();
getReqVo.setId(reqVo.getId());
CompanyBankCardVo companyBankCardVo = companyBankCardDao.load(getReqVo,CompanyBankCardVo.class);
if (null != companyBankCardVo){
companyBankCardDao.update(reqVo);
if (null != reqVo.getId() && !"".equals(reqVo.getId())){
getReqVo.setId(reqVo.getId());
CompanyBankCardVo companyBankCardVo = companyBankCardDao.load(getReqVo,CompanyBankCardVo.class);
if (null != companyBankCardVo){
companyBankCardDao.update(reqVo);
}
}
/*若卡不存在,则新增*/
else{
......@@ -208,12 +226,6 @@ public class CompanyServiceImpl implements CompanyService{
companyBankCardDao.remove(reqVo);
}
@Override
public String updateBank(CompanyBankCardVo reqVo) {
companyBankCardDao.update(reqVo);
return reqVo.getId();
}
@Override
public void setDefault(CompanyBankCardVo reqVo) {
/*获取该银行卡的公司id*/
......@@ -297,4 +309,15 @@ public class CompanyServiceImpl implements CompanyService{
public String saveUser(WebUserReqVo reqVo) {
return userServiceImpl.saveUser(reqVo);
}
@Override
public List<CompanyVo> productOrInterface(ProductOrInterfaceReqVo reqVo) {
CompanyGetReqVo getReqVo = new CompanyGetReqVo();
ObjectHelper.writeWithFrom(getReqVo,reqVo);
List<CompanyVo> companyVoList = companyDao.loadList(getReqVo,CompanyVo.class);
if (null == companyVoList || companyVoList.isEmpty()){
throw new CodeException("未找到公司信息");
}
return companyVoList;
}
}
......@@ -3,16 +3,18 @@ package com.pangding.web.authority.service.impl;
import com.pangding.web.authority.dao.CompanyExtendDao;
import com.pangding.web.authority.dao.WechatUserDao;
import com.pangding.web.authority.service.IndexService;
import com.pangding.web.authority.util.TimeConstant;
import com.pangding.web.authority.vo.CompanyExtendVo;
import com.pangding.web.authority.vo.reqvo.TotalIncomeReqVo;
import com.pangding.web.authority.vo.reqvo.UserPrecipitationReqVo;
import com.pangding.web.authority.vo.reqvo.WechatUserGetReqVo;
import com.pangding.web.authority.vo.reqvo.WithdrawCashReqVo;
import com.pangding.web.authority.vo.WechatUserVo;
import com.pangding.web.authority.vo.reqvo.*;
import com.yanzuoguang.util.exception.CodeException;
import com.yanzuoguang.util.helper.DateHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.*;
/**
* @Author zhangjinyao
......@@ -50,7 +52,7 @@ public class IndexServiceImpl implements IndexService {
*/
@Override
public BigDecimal getTotalIncome(TotalIncomeReqVo reqVo) {
/*此处需调用订单服务获取累积总收益
/*此处需调用订单服务传入公司id获取累积总收益
* 目前仅返回null*/
return null;
}
......@@ -61,9 +63,77 @@ public class IndexServiceImpl implements IndexService {
* @return 用户沉淀量
*/
@Override
public int getUserPrecipitation(UserPrecipitationReqVo reqVo) {
public Integer getUserPrecipitation(UserPrecipitationReqVo reqVo) {
WechatUserGetReqVo getReqVo = new WechatUserGetReqVo();
getReqVo.setCompanyId(reqVo.getId());
return wechatUserDaoImpl.getUserPrecipitation(getReqVo);
List<WechatUserVo> wechatUserVoList = wechatUserDaoImpl.loadList(getReqVo, WechatUserVo.class);
if (null == wechatUserVoList || wechatUserVoList.isEmpty()){
return 0;
}
return wechatUserVoList.size();
}
/**
* 通过公司id获取该公司今日实收金额
* @param reqVo 封装了公司id的请求对象
* @return 今日实收金额
*/
@Override
public BigDecimal getTodayIncome(TodayIncomeReqVo reqVo) {
/*此处需调用订单服务传入公司id获取今日实收金额
* 目前仅返回null*/
return null;
}
/**
* 通过公司id获取该公司的跨界盈利
* @param reqVo 封装了公司id的请求对象
* @return 跨界盈利
*/
@Override
public String getTransboundaryProfit(TransboundaryProfitReqVo reqVo) {
/*此处需调用订单服务传入公司id获取跨界盈利
* 目前仅返回公司id*/
return reqVo.getId();
}
/**
* 根据公司id获取该公司本年度的用户趋势
* @param reqVo
* @return
*/
@Override
public List<Long> getUserTrending(UserTrendingReqVo reqVo) {
List<Long> resList = new ArrayList();
String[] monthList = {TimeConstant.JANUARY_BEGIN
,TimeConstant.FEBRUARY_BEGIN
,TimeConstant.MARCH_BEGIN
,TimeConstant.APRIL_BEGIN
,TimeConstant.MAY_BEGIN
,TimeConstant.JUNE_BEGIN
,TimeConstant.JULY_BEGIN
,TimeConstant.AUGUST_BEGIN
,TimeConstant.SEPTEMBER_BEGIN
,TimeConstant.OCTOBER_BEGIN
,TimeConstant.NOVEMBER_BEGIN
,TimeConstant.DECEMBER_BEGIN
,TimeConstant.YEAR_END};
WechatUserGetReqVo getReqVo = new WechatUserGetReqVo();
getReqVo.setCompanyId(reqVo.getId());
for (int i = 0; i < monthList.length-1; i++) {
getReqVo.setStart(monthList[i]);
getReqVo.setEnd(monthList[i+1]);
List<Map> list = (List<Map>) wechatUserDaoImpl.getUserNumByMonth(getReqVo);
Long num = (Long) list.get(0).get("num");
resList.add(num);
}
return resList;
}
@Override
public Object getFundTrending(FundTrendingReqVo reqVo) {
/*调用订单服务获取资金趋势
* 目前仅返回null*/
return null;
}
}
......@@ -19,6 +19,7 @@ import com.yanzuoguang.token.TokenHelper;
import com.yanzuoguang.util.base.ObjectHelper;
import com.yanzuoguang.util.exception.CodeException;
import com.yanzuoguang.util.helper.StringHelper;
import com.yanzuoguang.util.vo.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -163,11 +164,18 @@ public class RegisterServiceImpl implements RegisterService {
req.setProductCompanyId(reqVo.getId());
req.setUserId(userVo.getId());
req.setUsername(userVo.getAccount());
req.setReqId(StringHelper.getNewID());
req.setReqId(reqVo.getReqId());
if (null == reqVo.getMerchantId() || "".equals(reqVo.getMerchantId())){
req.setId(StringHelper.getNewID());
}else {
req.setId(reqVo.getMerchantId());
}
SaveCompanyResVo resVo = new SaveCompanyResVo();
if (storeFeign.merchantCreate(req).getCode().equals("00")){
String merchantId = (String) storeFeign.merchantCreate(req).getData();
ResponseResult result = storeFeign.merchantCreate(req);
if (result.getCode().equals("00")){
String merchantId = (String) result.getData();
resVo.setMerchantId(merchantId);
}
......@@ -223,9 +231,15 @@ public class RegisterServiceImpl implements RegisterService {
req.setProductCompanyId(reqVo.getId());
req.setUserId(userVo.getId());
req.setUsername(userVo.getAccount());
if (null == reqVo.getMerchantId() || "".equals(reqVo.getMerchantId())){
req.setId(StringHelper.getNewID());
}else {
req.setId(reqVo.getMerchantId());
}
if (storeFeign.merchantCreate(req).getCode().equals("00")){
String merchantId = (String) storeFeign.merchantCreate(req).getData();
ResponseResult result = storeFeign.merchantCreate(req);
if (result.getCode().equals("00")){
String merchantId = (String) result.getData();
resVo.setMerchantId(merchantId);
}
......@@ -268,20 +282,20 @@ public class RegisterServiceImpl implements RegisterService {
companyGetReqVo.setId(userVo.getCompanyId());
CompanyVo companyVo = companyDaoImpl.load(companyGetReqVo,CompanyVo.class);
/*判断基本信息是否完善,及状态是否为2,且为个人用户,若不完善则跳转个人完善页面*/
if (companyVo.getStatus() != LoginConstant.FINISHED_BASIC_INFO && CompanyConstant.COMPANY_TYPE_PERSON == companyVo.getCompanyType()){
/*if (!companyVo.getStatus().equals(LoginConstant.FINISHED_BASIC_INFO) && CompanyConstant.COMPANY_TYPE_PERSON.equals(companyVo.getCompanyType())){
resVo.setCode("01");
return resVo;
}
}*/
/*判断基本信息是否完善,及状态是否为2,且为公司用户,若不完善则跳转个人完善页面*/
else if (companyVo.getStatus() != LoginConstant.FINISHED_BASIC_INFO && CompanyConstant.COMPANY_TYPE_COMPANY == companyVo.getCompanyType()){
/*else if (!companyVo.getStatus().equals(LoginConstant.FINISHED_BASIC_INFO) && CompanyConstant.COMPANY_TYPE_COMPANY.equals(companyVo.getCompanyType())){
resVo.setCode("02");
return resVo;
}
}*/
/*判断电子签约状态,若不为10,则跳转签约页面*/
else if (companyVo.getSigningStatus() != LoginConstant.HAVE_SIGNED){
/*else if (!companyVo.getSigningStatus().equals(LoginConstant.HAVE_SIGNED)){
resVo.setCode("04");
return resVo;
}
}*/
LoginCompanyResVo loginCompanyResVo = new LoginCompanyResVo();
loginCompanyResVo.setId(companyVo.getId());
loginCompanyResVo.setStatus(companyVo.getStatus());
......@@ -295,11 +309,11 @@ public class RegisterServiceImpl implements RegisterService {
for (CompanyBankCardVo companyBankCardVo:companyBankCardVoList) {
bankCardCodeList.add(companyBankCardVo.getBankCardCode());
}
}else{
/*该公司没有银行卡,需要跳转添加银行卡*/
}/*else{
*//*该公司没有银行卡,需要跳转添加银行卡*//*
resVo.setCode("03");
return resVo;
}
}*/
/*获取用户权限列表*/
UserRoleGetReqVo userRoleGetReqVo = new UserRoleGetReqVo();
userRoleGetReqVo.setUserId(userVo.getId());
......
......@@ -44,7 +44,8 @@ public class UserServiceImpl implements UserService {
webUserReqVo.setPassword(md5Password);
webUserReqVo.setId(StringHelper.getNewID());
UserVo userVo = webUserReqVo;
UserVo userVo = new UserVo();
ObjectHelper.writeWithFrom(userVo,webUserReqVo);
userDao.create(userVo);
saveUserRole(webUserReqVo);
......
......@@ -9,11 +9,11 @@ public class CompanyBankCardConstant {
* 设置银行卡为默认卡
* 值:1
*/
public static final int IS_DEFAULT = 1;
public static final String IS_DEFAULT = "1";
/**
* 不设置为默认卡
* 值:0
*/
public static final int IS_NOT_DEFAULT = 0;
public static final String IS_NOT_DEFAULT = "0";
}
......@@ -6,12 +6,18 @@ public class CompanyConstant {
* 公司类型 个人
* 值:0
*/
public static final int COMPANY_TYPE_PERSON = 0;
public static final String COMPANY_TYPE_PERSON = "0";
/**
* 公司类型 公司
* 值:1
*/
public static final int COMPANY_TYPE_COMPANY = 1;
public static final String COMPANY_TYPE_COMPANY = "1";
/**
* 公司状态 停用
* 值:12
*/
public static final String COMPANY_STATUS_STOP = "12";
}
package com.pangding.web.authority.util;
/**
* @Author zhangjinyao
* @create 2019/5/31 10:28
*/
public class RoleConstant {
/**
* 超级管理员角色id
*/
public static final String SUPER_ADMIN_ROLE_ID = "z001559267717678b813b7a85db4521f";
}
package com.pangding.web.authority.util;
import com.yanzuoguang.util.helper.DateHelper;
/**
* @Author zhangjinyao
* @create 2019/5/31 16:35
*/
public class TimeConstant {
/**
* 当前年份
*/
private static String year = DateHelper.getCurrentYear();
/**
* 一月开始时间
*/
public static final String JANUARY_BEGIN = year+"-01-01 00:00:00";
/**
* 二月开始时间
*/
public static final String FEBRUARY_BEGIN = year+"-02-01 00:00:00";
/**
* 三月开始时间
*/
public static final String MARCH_BEGIN = year+"-03-01 00:00:00";
/**
* 四月开始时间
*/
public static final String APRIL_BEGIN = year+"-04-01 00:00:00";
/**
* 五月开始时间
*/
public static final String MAY_BEGIN = year+"-05-01 00:00:00";
/**
* 六月开始时间
*/
public static final String JUNE_BEGIN = year+"-06-01 00:00:00";
/**
* 七月开始时间
*/
public static final String JULY_BEGIN = year+"-07-01 00:00:00";
/**
* 八月开始时间
*/
public static final String AUGUST_BEGIN = year+"-08-01 00:00:00";
/**
* 九月开始时间
*/
public static final String SEPTEMBER_BEGIN = year+"-09-01 00:00:00";
/**
* 十月开始时间
*/
public static final String OCTOBER_BEGIN = year+"-10-01 00:00:00";
/**
* 十一月开始时间
*/
public static final String NOVEMBER_BEGIN = year+"-11-01 00:00:00";
/**
* 十二月开始时间
*/
public static final String DECEMBER_BEGIN = year+"-12-01 00:00:00";
/**
* 当年结束时间
*/
public static final String YEAR_END = year+"-12-31 11:59:59";
}
......@@ -3,6 +3,7 @@ package com.pangding.web.authority.vo;
import com.yanzuoguang.dao.TableAnnotation;
import com.yanzuoguang.util.helper.DateHelper;
import com.yanzuoguang.util.helper.StringHelper;
import com.yanzuoguang.util.vo.BaseVo;
import com.yanzuoguang.util.vo.InitDao;
import java.io.Serializable;
......@@ -13,7 +14,7 @@ import java.sql.Timestamp;
* @author zhangjinyao
*/
@TableAnnotation("pd_authority")
public class AuthorityVo implements Serializable, InitDao {
public class AuthorityVo extends BaseVo implements InitDao {
private String id;
......@@ -21,14 +22,14 @@ public class AuthorityVo implements Serializable, InitDao {
private String name;
private int type;
private String type;
private String alias;
private String url;
@TableAnnotation("open_mode")
private int openMode;
private String openMode;
private String remark;
......@@ -36,13 +37,13 @@ public class AuthorityVo implements Serializable, InitDao {
private String createTime;
private int sort;
private String sort;
public int getSort() {
public String getSort() {
return sort;
}
public void setSort(int sort) {
public void setSort(String sort) {
this.sort = sort;
}
......@@ -70,11 +71,11 @@ public class AuthorityVo implements Serializable, InitDao {
this.name = name;
}
public int getType() {
public String getType() {
return type;
}
public void setType(int type) {
public void setType(String type) {
this.type = type;
}
......@@ -94,11 +95,11 @@ public class AuthorityVo implements Serializable, InitDao {
this.url = url;
}
public int getOpenMode() {
public String getOpenMode() {
return openMode;
}
public void setOpenMode(int openMode) {
public void setOpenMode(String openMode) {
this.openMode = openMode;
}
......
package com.pangding.web.authority.vo;
import com.yanzuoguang.dao.TableAnnotation;
import com.yanzuoguang.util.vo.BaseVo;
import java.io.Serializable;
......@@ -9,7 +10,7 @@ import java.io.Serializable;
* @create 2019/5/16 14:17
*/
@TableAnnotation("pd_company_bank_card")
public class CompanyBankCardVo implements Serializable {
public class CompanyBankCardVo extends BaseVo {
private String id;
@TableAnnotation("bank_card_code")
......@@ -24,7 +25,7 @@ public class CompanyBankCardVo implements Serializable {
@TableAnnotation("bank_code")
private String bankCode;
private int type;
private String type;
@TableAnnotation("company_id")
private String companyId;
......@@ -37,7 +38,7 @@ public class CompanyBankCardVo implements Serializable {
@TableAnnotation("reserved_phone")
private String reservedPhone;
private int status;
private String status;
@TableAnnotation("binding_code")
private String bindingCode;
......@@ -46,13 +47,13 @@ public class CompanyBankCardVo implements Serializable {
private String bindingTime;
@TableAnnotation("is_default")
private int isDefault;
private String isDefault;
public int getIsDefault() {
public String getIsDefault() {
return isDefault;
}
public void setIsDefault(int isDefault) {
public void setIsDefault(String isDefault) {
this.isDefault = isDefault;
}
......@@ -96,11 +97,11 @@ public class CompanyBankCardVo implements Serializable {
this.bankCode = bankCode;
}
public int getType() {
public String getType() {
return type;
}
public void setType(int type) {
public void setType(String type) {
this.type = type;
}
......@@ -136,11 +137,11 @@ public class CompanyBankCardVo implements Serializable {
this.reservedPhone = reservedPhone;
}
public int getStatus() {
public String getStatus() {
return status;
}
public void setStatus(int status) {
public void setStatus(String status) {
this.status = status;
}
......
package com.pangding.web.authority.vo;
import com.yanzuoguang.dao.TableAnnotation;
import com.yanzuoguang.util.vo.BaseVo;
import java.io.Serializable;
import java.math.BigDecimal;
......@@ -10,14 +11,14 @@ import java.math.BigDecimal;
* @create 2019/5/16 15:35
*/
@TableAnnotation("pd_company_extend")
public class CompanyExtendVo implements Serializable {
public class CompanyExtendVo extends BaseVo {
private String id;
@TableAnnotation("QR_code")
private String qrCode;
@TableAnnotation("QR_code_type")
private int qrCodeType;
private String qrCodeType;
@TableAnnotation("QR_code_url")
private String qrCodeUrl;
......@@ -26,7 +27,7 @@ public class CompanyExtendVo implements Serializable {
* 是否分账
*/
@TableAnnotation("subledger_status")
private int subledgerStatus;
private String subledgerStatus;
/**
* 分账规则
......@@ -38,7 +39,7 @@ public class CompanyExtendVo implements Serializable {
* 是否分润
*/
@TableAnnotation("divide_status")
private int divedeStatus;
private String divedeStatus;
/**
* 分润规则
......@@ -50,7 +51,7 @@ public class CompanyExtendVo implements Serializable {
* 是够可提现
*/
@TableAnnotation("withdraw_status")
private int withdrawStatus;
private String withdrawStatus;
/**
* 提现规则
......@@ -68,7 +69,7 @@ public class CompanyExtendVo implements Serializable {
* 是否扫码支付
*/
@TableAnnotation("scan_code_pay_status")
private int scanCodePayStatus;
private String scanCodePayStatus;
/**
* 支付规则
......@@ -80,7 +81,7 @@ public class CompanyExtendVo implements Serializable {
* 是否邀请
*/
@TableAnnotation("invitation_status")
private int invitationStatus;
private String invitationStatus;
/**
* 邀请规则
......@@ -115,11 +116,11 @@ public class CompanyExtendVo implements Serializable {
this.qrCode = qrCode;
}
public int getQrCodeType() {
public String getQrCodeType() {
return qrCodeType;
}
public void setQrCodeType(int qrCodeType) {
public void setQrCodeType(String qrCodeType) {
this.qrCodeType = qrCodeType;
}
......@@ -131,11 +132,11 @@ public class CompanyExtendVo implements Serializable {
this.qrCodeUrl = qrCodeUrl;
}
public int getSubledgerStatus() {
public String getSubledgerStatus() {
return subledgerStatus;
}
public void setSubledgerStatus(int subledgerStatus) {
public void setSubledgerStatus(String subledgerStatus) {
this.subledgerStatus = subledgerStatus;
}
......@@ -147,11 +148,11 @@ public class CompanyExtendVo implements Serializable {
this.subledgerRuleId = subledgerRuleId;
}
public int getDivedeStatus() {
public String getDivedeStatus() {
return divedeStatus;
}
public void setDivedeStatus(int divedeStatus) {
public void setDivedeStatus(String divedeStatus) {
this.divedeStatus = divedeStatus;
}
......@@ -163,11 +164,11 @@ public class CompanyExtendVo implements Serializable {
this.divideRuleId = divideRuleId;
}
public int getWithdrawStatus() {
public String getWithdrawStatus() {
return withdrawStatus;
}
public void setWithdrawStatus(int withdrawStatus) {
public void setWithdrawStatus(String withdrawStatus) {
this.withdrawStatus = withdrawStatus;
}
......@@ -179,11 +180,11 @@ public class CompanyExtendVo implements Serializable {
this.withdrawRuleId = withdrawRuleId;
}
public int getScanCodePayStatus() {
public String getScanCodePayStatus() {
return scanCodePayStatus;
}
public void setScanCodePayStatus(int scanCodePayStatus) {
public void setScanCodePayStatus(String scanCodePayStatus) {
this.scanCodePayStatus = scanCodePayStatus;
}
......@@ -195,11 +196,11 @@ public class CompanyExtendVo implements Serializable {
this.payRuleId = payRuleId;
}
public int getInvitationStatus() {
public String getInvitationStatus() {
return invitationStatus;
}
public void setInvitationStatus(int invitationStatus) {
public void setInvitationStatus(String invitationStatus) {
this.invitationStatus = invitationStatus;
}
......
......@@ -3,6 +3,7 @@ package com.pangding.web.authority.vo;
import com.yanzuoguang.dao.TableAnnotation;
import com.yanzuoguang.util.helper.DateHelper;
import com.yanzuoguang.util.helper.StringHelper;
import com.yanzuoguang.util.vo.BaseVo;
import com.yanzuoguang.util.vo.InitDao;
import java.io.Serializable;
......@@ -13,7 +14,7 @@ import java.sql.Timestamp;
* @create 2019/5/13 14:44
*/
@TableAnnotation("pd_company")
public class CompanyVo implements Serializable, InitDao {
public class CompanyVo extends BaseVo implements InitDao {
private String id;
......@@ -26,7 +27,7 @@ public class CompanyVo implements Serializable, InitDao {
private String companyName;
@TableAnnotation("company_type")
private int companyType;
private String companyType;
@TableAnnotation("business_license_code")
private String businessLicenseCode;
......@@ -34,7 +35,7 @@ public class CompanyVo implements Serializable, InitDao {
private String address;
@TableAnnotation("company_attribute")
private int companyAttribute;
private String companyAttribute;
@TableAnnotation("contact_name")
private String contactName;
......@@ -49,9 +50,9 @@ public class CompanyVo implements Serializable, InitDao {
private String electromicAgreementCode;
@TableAnnotation("signing_status")
private int signingStatus;
private String signingStatus;
private int status;
private String status;
@TableAnnotation("create_time")
private String createTime;
......@@ -59,7 +60,18 @@ public class CompanyVo implements Serializable, InitDao {
@TableAnnotation("update_time")
private String updateTime;
private int nature;
private String nature;
@TableAnnotation("product_or_interface")
private String productOrInterface;
public String getProductOrInterface() {
return productOrInterface;
}
public void setProductOrInterface(String productOrInterface) {
this.productOrInterface = productOrInterface;
}
public String getId() {
return id;
......@@ -93,11 +105,11 @@ public class CompanyVo implements Serializable, InitDao {
this.companyName = companyName;
}
public int getCompanyType() {
public String getCompanyType() {
return companyType;
}
public void setCompanyType(int companyType) {
public void setCompanyType(String companyType) {
this.companyType = companyType;
}
......@@ -117,11 +129,11 @@ public class CompanyVo implements Serializable, InitDao {
this.address = address;
}
public int getCompanyAttribute() {
public String getCompanyAttribute() {
return companyAttribute;
}
public void setCompanyAttribute(int companyAttribute) {
public void setCompanyAttribute(String companyAttribute) {
this.companyAttribute = companyAttribute;
}
......@@ -157,19 +169,19 @@ public class CompanyVo implements Serializable, InitDao {
this.electromicAgreementCode = electromicAgreementCode;
}
public int getSigningStatus() {
public String getSigningStatus() {
return signingStatus;
}
public void setSigningStatus(int signingStatus) {
public void setSigningStatus(String signingStatus) {
this.signingStatus = signingStatus;
}
public int getStatus() {
public String getStatus() {
return status;
}
public void setStatus(int status) {
public void setStatus(String status) {
this.status = status;
}
......@@ -189,16 +201,18 @@ public class CompanyVo implements Serializable, InitDao {
this.updateTime = updateTime;
}
public int getNature() {
public String getNature() {
return nature;
}
public void setNature(int nature) {
public void setNature(String nature) {
this.nature = nature;
}
@Override
public void init() {
this.createTime = StringHelper.getFirst(this.createTime, DateHelper.getNow());
this.status = StringHelper.getFirst(this.status, "0");
this.companyAttribute = StringHelper.getFirst(this.companyAttribute,"0");
}
}
......@@ -3,6 +3,7 @@ package com.pangding.web.authority.vo;
import com.yanzuoguang.dao.TableAnnotation;
import com.yanzuoguang.util.helper.StringHelper;
import com.yanzuoguang.util.vo.BaseVo;
import com.yanzuoguang.util.vo.InitDao;
/**
......@@ -11,7 +12,7 @@ import com.yanzuoguang.util.vo.InitDao;
* @author 颜佐光
*/
@TableAnnotation("login_token")
public class LoginVo implements InitDao {
public class LoginVo extends BaseVo implements InitDao {
/**
* 编号,主键请放第一个
* 假如是一样的字段,则不需要写映射.下面的代码添加映射关系
......
......@@ -60,7 +60,7 @@ public class Merchant extends BaseVo {
/**
* 类型(1:景区;2:餐饮;3:酒店)
*/
private Integer type;
private String type;
/**
* 标签
......@@ -75,7 +75,7 @@ public class Merchant extends BaseVo {
/**
* 状态(0:上架;1:下架)
*/
private Integer status;
private String status;
/**
* 游玩耗时
......@@ -215,11 +215,11 @@ public class Merchant extends BaseVo {
this.address = address;
}
public Integer getType() {
public String getType() {
return type;
}
public void setType(Integer type) {
public void setType(String type) {
this.type = type;
}
......@@ -239,11 +239,11 @@ public class Merchant extends BaseVo {
this.level = level;
}
public Integer getStatus() {
public String getStatus() {
return status;
}
public void setStatus(Integer status) {
public void setStatus(String status) {
this.status = status;
}
......
......@@ -9,7 +9,7 @@ import java.io.Serializable;
* @author zhangjinyao
*/
@TableAnnotation("pd_role_authority")
public class RoleAuthorityVo implements Serializable {
public class RoleAuthorityVo extends BaseVo {
private String id;
......
package com.pangding.web.authority.vo;
import com.yanzuoguang.dao.TableAnnotation;
import com.yanzuoguang.util.vo.BaseVo;
import java.io.Serializable;
import java.util.Date;
......@@ -9,7 +10,7 @@ import java.util.Date;
* @author zhangjinyao
*/
@TableAnnotation("pd_role")
public class RoleVo implements Serializable {
public class RoleVo extends BaseVo {
private String id;
......
package com.pangding.web.authority.vo;
import com.yanzuoguang.dao.TableAnnotation;
import com.yanzuoguang.util.vo.BaseVo;
import java.io.Serializable;
......@@ -8,7 +9,7 @@ import java.io.Serializable;
* @author zhangjinyao
*/
@TableAnnotation("pd_user_role")
public class UserRoleVo implements Serializable {
public class UserRoleVo extends BaseVo {
private String id;
......
......@@ -3,6 +3,7 @@ package com.pangding.web.authority.vo;
import com.yanzuoguang.dao.TableAnnotation;
import com.yanzuoguang.util.helper.DateHelper;
import com.yanzuoguang.util.helper.StringHelper;
import com.yanzuoguang.util.vo.BaseVo;
import com.yanzuoguang.util.vo.InitDao;
import java.io.Serializable;
......@@ -13,7 +14,7 @@ import java.util.Date;
* @author zhangjinyao
*/
@TableAnnotation("pd_user")
public class UserVo implements Serializable, InitDao {
public class UserVo extends BaseVo implements InitDao {
private String id;
......
package com.pangding.web.authority.vo;
import com.yanzuoguang.dao.TableAnnotation;
import com.yanzuoguang.util.vo.BaseVo;
import com.yanzuoguang.util.vo.InitDao;
import java.io.Serializable;
......@@ -11,7 +12,7 @@ import java.math.BigDecimal;
* @create 2019/5/29 16:25
*/
@TableAnnotation("pd_wechat_user")
public class WechatUserVo implements Serializable, InitDao {
public class WechatUserVo extends BaseVo implements InitDao {
private String id;
private String nickname;
......@@ -34,9 +35,9 @@ public class WechatUserVo implements Serializable, InitDao {
private String address;
private int status;
private String status;
private int age;
private String age;
@TableAnnotation("follow_time")
private String followTime;
......@@ -124,19 +125,19 @@ public class WechatUserVo implements Serializable, InitDao {
this.address = address;
}
public int getStatus() {
public String getStatus() {
return status;
}
public void setStatus(int status) {
public void setStatus(String status) {
this.status = status;
}
public int getAge() {
public String getAge() {
return age;
}
public void setAge(int age) {
public void setAge(String age) {
this.age = age;
}
......
......@@ -10,7 +10,7 @@ public class AuthorityGetReqVo {
private String pid;
private int sort;
private String sort;
public String getReqId() {
return reqId;
......@@ -20,11 +20,11 @@ public class AuthorityGetReqVo {
this.reqId = reqId;
}
public int getSort() {
public String getSort() {
return sort;
}
public void setSort(int sort) {
public void setSort(String sort) {
this.sort = sort;
}
......
......@@ -7,6 +7,16 @@ package com.pangding.web.authority.vo.reqvo;
public class AuthorityListReqVo {
private String reqId;
private String levelOne;
public String getLevelOne() {
return levelOne;
}
public void setLevelOne(String levelOne) {
this.levelOne = levelOne;
}
public String getReqId() {
return reqId;
}
......
......@@ -11,27 +11,27 @@ public class CompanyAndCompanyExtendSaveReqVo extends CompanyVo {
private String qrCode;
private int qrCodeType;
private String qrCodeType;
private String qrCodeUrl;
private int isSubAccount;
private String isSubAccount;
private String subAccountRule;
private int isSubProfit;
private String isSubProfit;
private String subProfitRule;
private int isWithdraw;
private String isWithdraw;
private String withdrawRule;
private int isScanCodePay;
private String isScanCodePay;
private String payRule;
private int isInvitate;
private String isInvitate;
private String invitateRule;
......@@ -53,11 +53,11 @@ public class CompanyAndCompanyExtendSaveReqVo extends CompanyVo {
this.qrCode = qrCode;
}
public int getQrCodeType() {
public String getQrCodeType() {
return qrCodeType;
}
public void setQrCodeType(int qrCodeType) {
public void setQrCodeType(String qrCodeType) {
this.qrCodeType = qrCodeType;
}
......@@ -69,11 +69,11 @@ public class CompanyAndCompanyExtendSaveReqVo extends CompanyVo {
this.qrCodeUrl = qrCodeUrl;
}
public int getIsSubAccount() {
public String getIsSubAccount() {
return isSubAccount;
}
public void setIsSubAccount(int isSubAccount) {
public void setIsSubAccount(String isSubAccount) {
this.isSubAccount = isSubAccount;
}
......@@ -85,11 +85,11 @@ public class CompanyAndCompanyExtendSaveReqVo extends CompanyVo {
this.subAccountRule = subAccountRule;
}
public int getIsSubProfit() {
public String getIsSubProfit() {
return isSubProfit;
}
public void setIsSubProfit(int isSubProfit) {
public void setIsSubProfit(String isSubProfit) {
this.isSubProfit = isSubProfit;
}
......@@ -101,11 +101,11 @@ public class CompanyAndCompanyExtendSaveReqVo extends CompanyVo {
this.subProfitRule = subProfitRule;
}
public int getIsWithdraw() {
public String getIsWithdraw() {
return isWithdraw;
}
public void setIsWithdraw(int isWithdraw) {
public void setIsWithdraw(String isWithdraw) {
this.isWithdraw = isWithdraw;
}
......@@ -117,11 +117,11 @@ public class CompanyAndCompanyExtendSaveReqVo extends CompanyVo {
this.withdrawRule = withdrawRule;
}
public int getIsScanCodePay() {
public String getIsScanCodePay() {
return isScanCodePay;
}
public void setIsScanCodePay(int isScanCodePay) {
public void setIsScanCodePay(String isScanCodePay) {
this.isScanCodePay = isScanCodePay;
}
......@@ -133,11 +133,11 @@ public class CompanyAndCompanyExtendSaveReqVo extends CompanyVo {
this.payRule = payRule;
}
public int getIsInvitate() {
public String getIsInvitate() {
return isInvitate;
}
public void setIsInvitate(int isInvitate) {
public void setIsInvitate(String isInvitate) {
this.isInvitate = isInvitate;
}
......
package com.pangding.web.authority.vo.reqvo;
/**
* @Author zhangjinyao
* @create 2019/5/31 10:05
*/
public class CompanyAuthorityReqVo {
private String reqId;
private String companyId;
public String getReqId() {
return reqId;
}
public void setReqId(String reqId) {
this.reqId = reqId;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
}
......@@ -9,6 +9,26 @@ public class CompanyGetReqVo {
private String id;
private String productOrInterface;
private String companyName;
public String getProductOrInterface() {
return productOrInterface;
}
public void setProductOrInterface(String productOrInterface) {
this.productOrInterface = productOrInterface;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getReqId() {
return reqId;
}
......
package com.pangding.web.authority.vo.reqvo;
/**
* @Author zhangjinyao
* @create 2019/5/31 19:55
*/
public class DeleteCompanyReqVo {
private String reqId;
private String companyId;
public String getReqId() {
return reqId;
}
public void setReqId(String reqId) {
this.reqId = reqId;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
}
package com.pangding.web.authority.vo.reqvo;
/**
* @Author zhangjinyao
* @create 2019/5/31 19:38
*/
public class FundTrendingReqVo {
private String reqId;
/**
* 公司id
*/
private String id;
public String getReqId() {
return reqId;
}
public void setReqId(String reqId) {
this.reqId = reqId;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
}
......@@ -9,6 +9,46 @@ import com.yanzuoguang.util.vo.PageSizeReqVo;
public class ListCompanyReqVo extends PageSizeReqVo {
private String reqId;
private String companyName;
private String companyType;
private String companyAttribute;
private String status;
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getCompanyType() {
return companyType;
}
public void setCompanyType(String companyType) {
this.companyType = companyType;
}
public String getCompanyAttribute() {
return companyAttribute;
}
public void setCompanyAttribute(String companyAttribute) {
this.companyAttribute = companyAttribute;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getReqId() {
return reqId;
}
......
......@@ -12,10 +12,10 @@ public class MerchantCreateReqVo extends Merchant{
private String reqId;
public String getReqId() {
return reqId;
return this.reqId;
}
public void setReqId(String reqId) {
reqId = reqId;
this.reqId = reqId;
}
}
package com.pangding.web.authority.vo.reqvo;
/**
* @Author zhangjinyao
* @create 2019/5/31 17:26
*/
public class ProductOrInterfaceReqVo {
private String reqId;
private String productOrInterface;
private String companyName;
public String getReqId() {
return reqId;
}
public void setReqId(String reqId) {
this.reqId = reqId;
}
public String getProductOrInterface() {
return productOrInterface;
}
public void setProductOrInterface(String productOrInterface) {
this.productOrInterface = productOrInterface;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
}
......@@ -11,7 +11,7 @@ public class RegisterEnterpriceReqVo {
private String invitationCompanyId;
private int companyType;
private String companyType;
private String companyName;
......@@ -21,7 +21,7 @@ public class RegisterEnterpriceReqVo {
private String merchantName;
private int companyAttribute;
private String companyAttribute;
private String contactName;
......@@ -39,6 +39,16 @@ public class RegisterEnterpriceReqVo {
private String reservedPhone;
private String merchantId;
public String getMerchantId() {
return merchantId;
}
public void setMerchantId(String merchantId) {
this.merchantId = merchantId;
}
public String getReqId() {
return reqId;
}
......@@ -63,11 +73,11 @@ public class RegisterEnterpriceReqVo {
this.invitationCompanyId = invitationCompanyId;
}
public int getCompanyType() {
public String getCompanyType() {
return companyType;
}
public void setCompanyType(int companyType) {
public void setCompanyType(String companyType) {
this.companyType = companyType;
}
......@@ -103,11 +113,11 @@ public class RegisterEnterpriceReqVo {
this.merchantName = merchantName;
}
public int getCompanyAttribute() {
public String getCompanyAttribute() {
return companyAttribute;
}
public void setCompanyAttribute(int companyAttribute) {
public void setCompanyAttribute(String companyAttribute) {
this.companyAttribute = companyAttribute;
}
......
......@@ -11,13 +11,13 @@ public class RegisterIndividualReqVo {
private String invitationCompanyId;
private int companyType;
private String companyType;
private String companyName;
private String address;
private int companyAttribute;
private String companyAttribute;
private String businessLicenseCode;
......@@ -27,6 +27,16 @@ public class RegisterIndividualReqVo {
private String contactPhone;
private String merchantId;
public String getMerchantId() {
return merchantId;
}
public void setMerchantId(String merchantId) {
this.merchantId = merchantId;
}
public String getReqId() {
return reqId;
}
......@@ -51,11 +61,11 @@ public class RegisterIndividualReqVo {
this.invitationCompanyId = invitationCompanyId;
}
public int getCompanyType() {
public String getCompanyType() {
return companyType;
}
public void setCompanyType(int companyType) {
public void setCompanyType(String companyType) {
this.companyType = companyType;
}
......@@ -75,11 +85,11 @@ public class RegisterIndividualReqVo {
this.address = address;
}
public int getCompanyAttribute() {
public String getCompanyAttribute() {
return companyAttribute;
}
public void setCompanyAttribute(int companyAttribute) {
public void setCompanyAttribute(String companyAttribute) {
this.companyAttribute = companyAttribute;
}
......
......@@ -14,7 +14,7 @@ public class RegisterUserReqVo {
private String confirmPassword;
private int companyType;
private String companyType;
private String invitationCode;
......@@ -50,11 +50,11 @@ public class RegisterUserReqVo {
this.password = password;
}
public int getCompanyType() {
public String getCompanyType() {
return companyType;
}
public void setCompanyType(int companyType) {
public void setCompanyType(String companyType) {
this.companyType = companyType;
}
......
package com.pangding.web.authority.vo.reqvo;
/**
* @Author zhangjinyao
* @create 2019/5/30 11:39
*/
public class TodayIncomeReqVo {
private String reqId;
/**
* 公司id
*/
private String id;
public String getReqId() {
return reqId;
}
public void setReqId(String reqId) {
this.reqId = reqId;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
}
package com.pangding.web.authority.vo.reqvo;
/**
* @Author zhangjinyao
* @create 2019/5/30 14:38
*/
public class TransboundaryProfitReqVo {
private String reqId;
/**
* 公司id
*/
private String id;
public String getReqId() {
return reqId;
}
public void setReqId(String reqId) {
this.reqId = reqId;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
}
package com.pangding.web.authority.vo.reqvo;
/**
* @Author zhangjinyao
* @create 2019/5/31 10:32
*/
public class UserGetSuperAdminReqVo {
private String companyId;
private String superAdminRoleId;
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
public String getSuperAdminRoleId() {
return superAdminRoleId;
}
public void setSuperAdminRoleId(String superAdminRoleId) {
this.superAdminRoleId = superAdminRoleId;
}
}
package com.pangding.web.authority.vo.reqvo;
/**
* @Author zhangjinyao
* @create 2019/5/30 14:48
*/
public class UserTrendingReqVo {
private String reqId;
/**
* 公司id
*/
private String id;
public String getReqId() {
return reqId;
}
public void setReqId(String reqId) {
this.reqId = reqId;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
}
......@@ -9,6 +9,26 @@ public class WechatUserGetReqVo {
private String companyId;
private String start;
private String end;
public String getStart() {
return start;
}
public void setStart(String start) {
this.start = start;
}
public String getEnd() {
return end;
}
public void setEnd(String end) {
this.end = end;
}
public String getReqId() {
return reqId;
}
......
package com.pangding.web.authority.vo.resvo;
import com.pangding.web.authority.vo.AuthorityVo;
import java.util.List;
/**
* @Author zhangjinyao
* @create 2019/5/30 18:10
*/
public class AuthorityListByLevelResVo extends AuthorityVo {
List<AuthorityListByLevelResVo> childList;
public List<AuthorityListByLevelResVo> getChildList() {
return childList;
}
public void setChildList(List<AuthorityListByLevelResVo> childList) {
this.childList = childList;
}
}
package com.pangding.web.authority.vo.resvo;
import com.pangding.web.authority.vo.AuthorityVo;
/**
* @Author zhangjinyao
* @create 2019/5/30 17:03
*/
public class AuthorityResVo extends AuthorityVo {
private String parentName;
public String getParentName() {
return parentName;
}
public void setParentName(String parentName) {
this.parentName = parentName;
}
}
......@@ -9,17 +9,17 @@ import java.util.List;
public class LoginCompanyResVo {
private String id;
private int status;
private String status;
private int companyAttribute;
private String companyAttribute;
private List<String> bankCardCodeList;
public int getCompanyAttribute() {
public String getCompanyAttribute() {
return companyAttribute;
}
public void setCompanyAttribute(int companyAttribute) {
public void setCompanyAttribute(String companyAttribute) {
this.companyAttribute = companyAttribute;
}
......@@ -31,11 +31,11 @@ public class LoginCompanyResVo {
this.id = id;
}
public int getStatus() {
public String getStatus() {
return status;
}
public void setStatus(int status) {
public void setStatus(String status) {
this.status = status;
}
......
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