| | |
| | | import com.dsh.guns.modular.system.service.IOperatorAuthService; |
| | | import com.dsh.guns.modular.system.service.IOperatorUserService; |
| | | import com.dsh.guns.modular.system.service.ITStudentService; |
| | | import com.dsh.guns.modular.system.util.WeChatUtil; |
| | | import com.github.binarywang.wxpay.bean.ecommerce.ApplymentsResult; |
| | | import com.github.binarywang.wxpay.service.EcommerceService; |
| | | import com.github.binarywang.wxpay.service.WxPayService; |
| | |
| | | private IOperatorAuthService operatorAuthService; |
| | | @Autowired |
| | | private TOperatorMapper operatorMapper; |
| | | @Autowired |
| | | private WeChatUtil weChatUtil; |
| | | // @Autowired |
| | | // private WeChatUtil weChatUtil; |
| | | |
| | | // @Override |
| | | // public void mgtShopAuth(MgtShopAuthDto mgtShopAuthDto) { |
| | | // |
| | | // OperatorAuthAlipay shopAuthentication = new OperatorAuth(); |
| | | // |
| | | // if(mgtShopAuthDto.getBlBusinessFoeverFlag()!=null&&mgtShopAuthDto.getBlBusinessFoeverFlag()==1){ |
| | | // mgtShopAuthDto.setBlBusinessDeanline("长期"); |
| | | // } |
| | | // if(mgtShopAuthDto.getLpIcForeverFlag()!=null&&mgtShopAuthDto.getLpIcForeverFlag()==1){ |
| | | // mgtShopAuthDto.setLpIcEndDate("长期"); |
| | | // } |
| | | // BeanUtils.copyProperties(mgtShopAuthDto , shopAuthentication); |
| | | // TOperator operator = operatorMapper.selectById(shopAuthentication.getOperatorId()); |
| | | // String applyNumber = UUIDUtil.getNativeUUID().replace("-",""); |
| | | // shopAuthentication.setOutBizNo(applyNumber); |
| | | // ApplymentsResult applymentsResult; |
| | | // try { |
| | | // applymentsResult = weChatUtil.ecommerceApply(shopAuthentication,applyNumber,operator); |
| | | // } catch (Exception e) { |
| | | // throw new ServiceException(e.getMessage()); |
| | | // } |
| | | // shopAuthentication.setOrderStatus("AUDITING"); |
| | | // shopAuthentication.setOrderNo(applymentsResult.getApplymentId()); |
| | | // operatorAuthService.saveOrUpdate(shopAuthentication); |
| | | // } |
| | | |
| | | @Override |
| | | public void mgtShopAuth(MgtShopAuthDto mgtShopAuthDto) { |
| | | |
| | | OperatorAuth shopAuthentication = new OperatorAuth(); |
| | | |
| | | if(mgtShopAuthDto.getBlBusinessFoeverFlag()!=null&&mgtShopAuthDto.getBlBusinessFoeverFlag()==1){ |
| | | mgtShopAuthDto.setBlBusinessDeanline("长期"); |
| | | } |
| | | if(mgtShopAuthDto.getLpIcForeverFlag()!=null&&mgtShopAuthDto.getLpIcForeverFlag()==1){ |
| | | mgtShopAuthDto.setLpIcEndDate("长期"); |
| | | } |
| | | BeanUtils.copyProperties(mgtShopAuthDto , shopAuthentication); |
| | | TOperator operator = operatorMapper.selectById(shopAuthentication.getOperatorId()); |
| | | String applyNumber = UUIDUtil.getNativeUUID().replace("-",""); |
| | | shopAuthentication.setOutBizNo(applyNumber); |
| | | ApplymentsResult applymentsResult; |
| | | try { |
| | | applymentsResult = weChatUtil.ecommerceApply(shopAuthentication,applyNumber,operator); |
| | | } catch (Exception e) { |
| | | throw new ServiceException(e.getMessage()); |
| | | } |
| | | shopAuthentication.setOrderStatus("AUDITING"); |
| | | shopAuthentication.setOrderNo(applymentsResult.getApplymentId()); |
| | | operatorAuthService.saveOrUpdate(shopAuthentication); |
| | | } |
| | | |
| | | @Override |