Commit 92ee709e authored by zjy's avatar zjy

user/role/tright 7.17

parent e9d293f5
...@@ -298,4 +298,10 @@ public class PangdingManagementController { ...@@ -298,4 +298,10 @@ public class PangdingManagementController {
CheckerHelper.newInstance().notBlankCheck("companyList", req.getCompanyIdList()).checkException(); CheckerHelper.newInstance().notBlankCheck("companyList", req.getCompanyIdList()).checkException();
return ResponseResult.result(companyServiceImpl.findCompanyDivideInfo(req)); return ResponseResult.result(companyServiceImpl.findCompanyDivideInfo(req));
} }
@RequestMapping(value = "/examineConfig",method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public ResponseResult examineConfig(@RequestBody ExamineConfigReqVo reqVo){
companyServiceImpl.examineConfig(reqVo);
return new ResponseResult();
}
} }
...@@ -7,6 +7,9 @@ import org.springframework.cloud.openfeign.FeignClient; ...@@ -7,6 +7,9 @@ import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/** /**
* @Author zhangjinyao * @Author zhangjinyao
* @create 2019/6/2 18:06 * @create 2019/6/2 18:06
...@@ -37,4 +40,13 @@ public interface PayFeign { ...@@ -37,4 +40,13 @@ public interface PayFeign {
*/ */
@RequestMapping(value = "/unbindBankCard") @RequestMapping(value = "/unbindBankCard")
public ResponseResult<CompanyBankReqVo> unbindBankCard(@RequestBody CompanyBankReqVo req); public ResponseResult<CompanyBankReqVo> unbindBankCard(@RequestBody CompanyBankReqVo req);
/**
* 获取签约地址
* @param req
* @return
* @throws IOException
*/
@RequestMapping(value = "/sign")
ResponseResult<CompanyReqVo> sign(@RequestBody CompanyReqVo req) throws IOException;
} }
...@@ -172,4 +172,6 @@ public interface CompanyService{ ...@@ -172,4 +172,6 @@ public interface CompanyService{
* @return * @return
*/ */
CompanyVo checkInvitationCode(CheckInvitationCodeReqVo reqVo); CompanyVo checkInvitationCode(CheckInvitationCodeReqVo reqVo);
void examineConfig(ExamineConfigReqVo reqVo);
} }
...@@ -828,4 +828,43 @@ public class CompanyServiceImpl implements CompanyService { ...@@ -828,4 +828,43 @@ public class CompanyServiceImpl implements CompanyService {
return companyDao.load(companyGetReqVo,CompanyVo.class); return companyDao.load(companyGetReqVo,CompanyVo.class);
} }
@Override
@Transactional(rollbackFor = Exception.class)
public void examineConfig(ExamineConfigReqVo reqVo) {
/*更新公司表*/
CompanyGetReqVo companyGetReqVo = new CompanyGetReqVo();
companyGetReqVo.setId(reqVo.getCompanyId());
CompanyVo companyVo = companyDao.load(companyGetReqVo,CompanyVo.class);
companyVo.setExamineStatus(reqVo.getExamineStatus());
companyVo.setExamineFailedReason(reqVo.getExamineFailedReason());
companyDao.update(companyVo);
/*更新公司扩展表*/
CompanyExtendGetReqVo companyExtendGetReqVo = new CompanyExtendGetReqVo();
companyExtendGetReqVo.setId(reqVo.getCompanyId());
CompanyExtendVo companyExtendVo = companyExtendDaoImpl.load(companyExtendGetReqVo,CompanyExtendVo.class);
companyExtendVo.setWithdrawMoney(reqVo.getWithdrawMoney());
companyExtendVo.setWithdrawRule(reqVo.getWithdrawRule());
companyExtendVo.setWithdrawFee(reqVo.getWithdrawFee());
companyExtendVo.setQrCodeType(reqVo.getQrCodeType());
companyExtendDaoImpl.update(companyExtendVo);
/*新增或更新pd_company_divide_rule表*/
CompanyDivideRuleVo companyDivideRuleVo = new CompanyDivideRuleVo();
ObjectHelper.writeWithFrom(companyDivideRuleVo,reqVo);
CompanyDivideRuleGetReqVo companyDivideRuleGetReqVo = new CompanyDivideRuleGetReqVo();
companyDivideRuleGetReqVo.setCompanyId(reqVo.getCompanyId());
CompanyDivideRuleVo companyDivideRuleResVo = companyDivideRuleDao.load(companyDivideRuleGetReqVo,CompanyDivideRuleVo.class);
if (null == companyDivideRuleResVo){
companyDivideRuleVo.setCompanyDivideId(StringHelper.getNewID());
companyDivideRuleDao.create(companyDivideRuleVo);
}else {
companyDivideRuleVo.setCompanyDivideId(companyDivideRuleResVo.getCompanyDivideId());
companyDivideRuleVo.setFee(companyDivideRuleResVo.getFee());
companyDivideRuleVo.setBonusType(companyDivideRuleResVo.getBonusType());
companyDivideRuleVo.setBonusValue(companyDivideRuleResVo.getBonusValue());
companyDivideRuleVo.setRealBonusValue(companyDivideRuleResVo.getRealBonusValue());
companyDivideRuleVo.setBonusExplain(companyDivideRuleResVo.getBonusExplain());
companyDivideRuleDao.update(companyDivideRuleVo);
}
}
} }
...@@ -395,9 +395,19 @@ public class RegisterServiceImpl implements RegisterService { ...@@ -395,9 +395,19 @@ public class RegisterServiceImpl implements RegisterService {
} }
/*判断电子签约状态,若不等于1,则跳转签约页面*/ /*判断电子签约状态,若不等于1,则跳转签约页面*/
else if (companyVo.getSigningStatus() != CompanyConstant.COMPANY_STATUS_SIGN_success){ else if (companyVo.getSigningStatus() != CompanyConstant.COMPANY_STATUS_SIGN_success){
CompanyReqVo companyReqVo = new CompanyReqVo();
companyReqVo.setId(companyVo.getId());
ResponseResult result = new ResponseResult();
try {
result = payFeign.sign(companyReqVo);
}catch (Exception e){
e.printStackTrace();
throw new CodeException("跳转签约页面失败,请重试");
}
CompanyReqVo companyReqVo1 = (CompanyReqVo) result.getData();
resVo.setCode("04"); resVo.setCode("04");
resVo.setMsg("未签约,跳转签约页面"); resVo.setMsg("未签约,跳转签约页面");
resVo.setUrl("TODO"); resVo.setUrl(companyReqVo1.getSignUrl());
return resVo; return resVo;
} }
......
...@@ -12,48 +12,45 @@ public class CompanyDivideRuleVo{ ...@@ -12,48 +12,45 @@ public class CompanyDivideRuleVo{
private String companyId; private String companyId;
@TableAnnotation("source_value") @TableAnnotation("source_value")
private double sourceValue; private Double sourceValue;
@TableAnnotation("real_source_value") @TableAnnotation("real_source_value")
private double realSourceValue; private Double realSourceValue;
@TableAnnotation("source_explain") @TableAnnotation("source_explain")
private String sourceExplain; private String sourceExplain;
@TableAnnotation("pass_value") @TableAnnotation("pass_value")
private double passValue; private Double passValue;
@TableAnnotation("real_pass_value") @TableAnnotation("real_pass_value")
private double realPassValue; private Double realPassValue;
@TableAnnotation("pass_explain") @TableAnnotation("pass_explain")
private String passExplain; private String passExplain;
@TableAnnotation("super_value") @TableAnnotation("super_value")
private double superValue; private Double superValue;
@TableAnnotation("real_super_value") @TableAnnotation("real_super_value")
private double realSuperValue; private Double realSuperValue;
@TableAnnotation("super_explain") @TableAnnotation("super_explain")
private String superExplain; private String superExplain;
private double fee; private Double fee;
@TableAnnotation("bonus_type") @TableAnnotation("bonus_type")
private int bonusType; private Integer bonusType;
@TableAnnotation("bonus_value") @TableAnnotation("bonus_value")
private double bonusValue; private Double bonusValue;
@TableAnnotation("real_bonus_value") @TableAnnotation("real_bonus_value")
private double realBonusValue; private Double realBonusValue;
@TableAnnotation("bonus_explain") @TableAnnotation("bonus_explain")
private String bonusExlain; private String bonusExplain;
@TableAnnotation("divide_status")
private int divideStatus;
public String getCompanyDivideId() { public String getCompanyDivideId() {
return companyDivideId; return companyDivideId;
...@@ -71,19 +68,19 @@ public class CompanyDivideRuleVo{ ...@@ -71,19 +68,19 @@ public class CompanyDivideRuleVo{
this.companyId = companyId; this.companyId = companyId;
} }
public double getSourceValue() { public Double getSourceValue() {
return sourceValue; return sourceValue;
} }
public void setSourceValue(double sourceValue) { public void setSourceValue(Double sourceValue) {
this.sourceValue = sourceValue; this.sourceValue = sourceValue;
} }
public double getRealSourceValue() { public Double getRealSourceValue() {
return realSourceValue; return realSourceValue;
} }
public void setRealSourceValue(double realSourceValue) { public void setRealSourceValue(Double realSourceValue) {
this.realSourceValue = realSourceValue; this.realSourceValue = realSourceValue;
} }
...@@ -95,19 +92,19 @@ public class CompanyDivideRuleVo{ ...@@ -95,19 +92,19 @@ public class CompanyDivideRuleVo{
this.sourceExplain = sourceExplain; this.sourceExplain = sourceExplain;
} }
public double getPassValue() { public Double getPassValue() {
return passValue; return passValue;
} }
public void setPassValue(double passValue) { public void setPassValue(Double passValue) {
this.passValue = passValue; this.passValue = passValue;
} }
public double getRealPassValue() { public Double getRealPassValue() {
return realPassValue; return realPassValue;
} }
public void setRealPassValue(double realPassValue) { public void setRealPassValue(Double realPassValue) {
this.realPassValue = realPassValue; this.realPassValue = realPassValue;
} }
...@@ -119,11 +116,11 @@ public class CompanyDivideRuleVo{ ...@@ -119,11 +116,11 @@ public class CompanyDivideRuleVo{
this.passExplain = passExplain; this.passExplain = passExplain;
} }
public double getSuperValue() { public Double getSuperValue() {
return superValue; return superValue;
} }
public void setSuperValue(double superValue) { public void setSuperValue(Double superValue) {
this.superValue = superValue; this.superValue = superValue;
} }
...@@ -143,43 +140,43 @@ public class CompanyDivideRuleVo{ ...@@ -143,43 +140,43 @@ public class CompanyDivideRuleVo{
this.superExplain = superExplain; this.superExplain = superExplain;
} }
public double getFee() { public Double getFee() {
return fee; return fee;
} }
public void setFee(double fee) { public void setFee(Double fee) {
this.fee = fee; this.fee = fee;
} }
public int getBonusType() { public Integer getBonusType() {
return bonusType; return bonusType;
} }
public void setBonusType(int bonusType) { public void setBonusType(Integer bonusType) {
this.bonusType = bonusType; this.bonusType = bonusType;
} }
public double getBonusValue() { public Double getBonusValue() {
return bonusValue; return bonusValue;
} }
public void setBonusValue(double bonusValue) { public void setBonusValue(Double bonusValue) {
this.bonusValue = bonusValue; this.bonusValue = bonusValue;
} }
public double getRealBonusValue() { public Double getRealBonusValue() {
return realBonusValue; return realBonusValue;
} }
public void setRealBonusValue(double realBonusValue) { public void setRealBonusValue(Double realBonusValue) {
this.realBonusValue = realBonusValue; this.realBonusValue = realBonusValue;
} }
public String getBonusExlain() { public String getBonusExplain() {
return bonusExlain; return bonusExplain;
} }
public void setBonusExlain(String bonusExlain) { public void setBonusExplain(String bonusExplain) {
this.bonusExlain = bonusExlain; this.bonusExplain = bonusExplain;
} }
} }
...@@ -69,6 +69,17 @@ public class CompanyVo extends BaseVo implements InitDao { ...@@ -69,6 +69,17 @@ public class CompanyVo extends BaseVo implements InitDao {
@TableAnnotation("examine_status") @TableAnnotation("examine_status")
private Integer examineStatus; private Integer examineStatus;
@TableAnnotation("examine_failed_reason")
private String examineFailedReason;
public String getExamineFailedReason() {
return examineFailedReason;
}
public void setExamineFailedReason(String examineFailedReason) {
this.examineFailedReason = examineFailedReason;
}
public Integer getExamineStatus() { public Integer getExamineStatus() {
return examineStatus; return examineStatus;
} }
......
package com.pangding.web.authority.vo.reqvo;
/**
* @Author zhangjinyao
* @create 2019/7/17 17:34
*/
public class CompanyDivideRuleGetReqVo {
private String companyId;
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
}
...@@ -82,6 +82,11 @@ public class CompanyReqVo { ...@@ -82,6 +82,11 @@ public class CompanyReqVo {
*/ */
private int signingStatus; private int signingStatus;
/**
* 签约地址
*/
private String signUrl;
/** /**
* 公司状态0初始化状态,1创建会员成功,2绑定手机,3企业实名认证成功, * 公司状态0初始化状态,1创建会员成功,2绑定手机,3企业实名认证成功,
4绑定支付密码,5公司实名认证中,6公司实名认证错误, 4绑定支付密码,5公司实名认证中,6公司实名认证错误,
...@@ -230,6 +235,14 @@ public class CompanyReqVo { ...@@ -230,6 +235,14 @@ public class CompanyReqVo {
this.signingStatus = signingStatus; this.signingStatus = signingStatus;
} }
public String getSignUrl() {
return signUrl;
}
public void setSignUrl(String signUrl) {
this.signUrl = signUrl;
}
public int getStatus() { public int getStatus() {
return status; return status;
} }
......
package com.pangding.web.authority.vo.reqvo;
import com.yanzuoguang.dao.TableAnnotation;
/**
* @Author zhangjinyao
* @create 2019/7/17 16:46
*/
public class ExamineConfigReqVo {
/**
* 公司id
*/
private String companyId;
/**
* 入口比例
*/
private Double sourceValue;
/**
* 实际入口比例
*/
private Double realSourceValue;
/**
* 入口比例说明
*/
private String sourceExplain;
/**
* 过境比例
*/
private Double passValue;
/**
* 实际过境比例
*/
private Double realPassValue;
/**
* 过境比例说明
*/
private String passExplain;
/**
* 上级比例
*/
private Double superValue;
/**
* 实际上级比例
*/
private Double realSuperValue;
/**
* 上级比例说明
*/
private String superExplain;
/**
* 限额
*/
private Double withdrawMoney;
/**
* 提现规则(0自动 ,1手动)
*/
private Integer withdrawRule;
/**
* 提现手续费
*/
private Double withdrawFee;
/**
* 二维码类型(0:关注;1:付款;2:源码)
*/
private Integer qrCodeType;
/**
* 0:未审核;1:审核通过,2审核不通过,3停用
*/
private Integer examineStatus;
/**
* 审核失败原因
*/
private String examineFailedReason;
public Integer getExamineStatus() {
return examineStatus;
}
public void setExamineStatus(Integer examineStatus) {
this.examineStatus = examineStatus;
}
public String getExamineFailedReason() {
return examineFailedReason;
}
public void setExamineFailedReason(String examineFailedReason) {
this.examineFailedReason = examineFailedReason;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
public Double getSourceValue() {
return sourceValue;
}
public void setSourceValue(Double sourceValue) {
this.sourceValue = sourceValue;
}
public Double getRealSourceValue() {
return realSourceValue;
}
public void setRealSourceValue(Double realSourceValue) {
this.realSourceValue = realSourceValue;
}
public String getSourceExplain() {
return sourceExplain;
}
public void setSourceExplain(String sourceExplain) {
this.sourceExplain = sourceExplain;
}
public Double getPassValue() {
return passValue;
}
public void setPassValue(Double passValue) {
this.passValue = passValue;
}
public Double getRealPassValue() {
return realPassValue;
}
public void setRealPassValue(Double realPassValue) {
this.realPassValue = realPassValue;
}
public String getPassExplain() {
return passExplain;
}
public void setPassExplain(String passExplain) {
this.passExplain = passExplain;
}
public Double getSuperValue() {
return superValue;
}
public void setSuperValue(Double superValue) {
this.superValue = superValue;
}
public Double getRealSuperValue() {
return realSuperValue;
}
public void setRealSuperValue(Double realSuperValue) {
this.realSuperValue = realSuperValue;
}
public String getSuperExplain() {
return superExplain;
}
public void setSuperExplain(String superExplain) {
this.superExplain = superExplain;
}
public Double getWithdrawMoney() {
return withdrawMoney;
}
public void setWithdrawMoney(Double withdrawMoney) {
this.withdrawMoney = withdrawMoney;
}
public Integer getWithdrawRule() {
return withdrawRule;
}
public void setWithdrawRule(Integer withdrawRule) {
this.withdrawRule = withdrawRule;
}
public Double getWithdrawFee() {
return withdrawFee;
}
public void setWithdrawFee(Double withdrawFee) {
this.withdrawFee = withdrawFee;
}
public Integer getQrCodeType() {
return qrCodeType;
}
public void setQrCodeType(Integer qrCodeType) {
this.qrCodeType = qrCodeType;
}
}
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