Commit 4d1e57be by 徐高华

Merge remote-tracking branch 'origin/feature/获取用户敏感信息' into developer

Conflicts:
	haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/fee/TabHaobanQywxFeeAccountInterceptLogMapper.java
	haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/fee/TabHaobanQywxFeeAccountStaffMapper.java
	haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/fee/HaobanQywxFeeAccountStaffService.java
	haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/fee/impl/HaobanQywxFeeAccountStaffServiceImpl.java
	haoban-manage3-service/src/main/resources/mapper/fee/TabHaobanQywxFeeAccountStaffMapper.xml
parents a595dfee f26d0c94
package com.gic.haoban.manage.service.dao.mapper.fee;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountInterceptLog;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
import java.util.List;
/**
* 企业微信账号拦截日志(TabHaobanQywxFeeAccountInterceptLog)表数据库访问层
*
* @author mozhu
* @since 2022-08-10 10:27:45
*/
public interface TabHaobanQywxFeeAccountInterceptLogMapper {
/**
* 通过ID查询单条数据
*
* @param feeAccountInterceptId 主键
* @return 实例对象
*/
TabHaobanQywxFeeAccountInterceptLog queryById(Long feeAccountInterceptId);
/**
* 查询指定行数据
*
* @param tabHaobanQywxFeeAccountInterceptLog 查询条件
* @param pageable 分页对象
* @return 对象列表
*/
List<TabHaobanQywxFeeAccountInterceptLog> queryAllByLimit(TabHaobanQywxFeeAccountInterceptLog tabHaobanQywxFeeAccountInterceptLog, @Param("pageable") Pageable pageable);
/**
* 新增数据
*
* @param tabHaobanQywxFeeAccountInterceptLog 实例对象
* @return 影响行数
*/
int insert(TabHaobanQywxFeeAccountInterceptLog tabHaobanQywxFeeAccountInterceptLog);
/**
* 批量新增数据(MyBatis原生foreach方法)
*
* @param entities List<TabHaobanQywxFeeAccountInterceptLog> 实例对象列表
* @return 影响行数
*/
int insertBatch(@Param("entities") List<TabHaobanQywxFeeAccountInterceptLog> entities);
/**
* 修改数据
*
* @param tabHaobanQywxFeeAccountInterceptLog 实例对象
* @return 影响行数
*/
int update(TabHaobanQywxFeeAccountInterceptLog tabHaobanQywxFeeAccountInterceptLog);
/**
* 通过主键删除数据
*
* @param feeAccountInterceptId 主键
* @return 影响行数
*/
int deleteById(Long feeAccountInterceptId);
/**
* 查询天气企业服务id
*
* @param wxEnterpriseId wx企业标识
* @return {@link List }<{@link TabHaobanQywxFeeAccountInterceptLog }>
* @author mozhu
* @date 2022-08-10 14:55:59
*/
List<TabHaobanQywxFeeAccountInterceptLog> queryByWxEnterpriseId(@Param("wxEnterpriseId") String wxEnterpriseId);
}
package com.gic.haoban.manage.service.dao.mapper.fee;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountInterceptLog;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
import java.util.List;
/**
* 企业微信账号拦截日志(TabHaobanQywxFeeAccountInterceptLog)表数据库访问层
*
* @author mozhu
* @since 2022-08-10 10:27:45
*/
public interface TabHaobanQywxFeeAccountInterceptLogMapper {
/**
* 通过ID查询单条数据
*
* @param feeAccountInterceptId 主键
* @return 实例对象
*/
TabHaobanQywxFeeAccountInterceptLog queryById(Long feeAccountInterceptId);
/**
* 查询指定行数据
*
* @param tabHaobanQywxFeeAccountInterceptLog 查询条件
* @param pageable 分页对象
* @return 对象列表
*/
List<TabHaobanQywxFeeAccountInterceptLog> queryAllByLimit(TabHaobanQywxFeeAccountInterceptLog tabHaobanQywxFeeAccountInterceptLog, @Param("pageable") Pageable pageable);
/**
* 新增数据
*
* @param tabHaobanQywxFeeAccountInterceptLog 实例对象
* @return 影响行数
*/
int insert(TabHaobanQywxFeeAccountInterceptLog tabHaobanQywxFeeAccountInterceptLog);
/**
* 批量新增数据(MyBatis原生foreach方法)
*
* @param entities List<TabHaobanQywxFeeAccountInterceptLog> 实例对象列表
* @return 影响行数
*/
int insertBatch(@Param("entities") List<TabHaobanQywxFeeAccountInterceptLog> entities);
/**
* 修改数据
*
* @param tabHaobanQywxFeeAccountInterceptLog 实例对象
* @return 影响行数
*/
int update(TabHaobanQywxFeeAccountInterceptLog tabHaobanQywxFeeAccountInterceptLog);
/**
* 查询天气企业服务id
*
* @param wxEnterpriseId wx企业标识
* @return {@link List }<{@link TabHaobanQywxFeeAccountInterceptLog }>
* @author mozhu
* @date 2022-08-10 14:55:59
*/
List<TabHaobanQywxFeeAccountInterceptLog> queryByWxEnterpriseId(@Param("wxEnterpriseId") String wxEnterpriseId);
}
package com.gic.haoban.manage.service.dao.mapper.fee;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDetailDTO;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountStaff;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
/**
* 企业微信收费订单成员激活详情(TabHaobanQywxFeeAccountStaff)表数据库访问层
*
* @author mozhu
* @since 2022-08-03 16:12:31
*/
public interface TabHaobanQywxFeeAccountStaffMapper {
/**
* 通过ID查询单条数据
*
* @param feeAccountId 主键
* @return 实例对象
*/
TabHaobanQywxFeeAccountStaff queryById(Long feeAccountId);
/**
* 新增数据
*
* @param tabHaobanQywxFeeAccountStaff 实例对象
* @return 影响行数
*/
int insert(TabHaobanQywxFeeAccountStaff tabHaobanQywxFeeAccountStaff);
/**
* 批量新增数据(MyBatis原生foreach方法)
*
* @param entities List<TabHaobanQywxFeeAccountStaff> 实例对象列表
* @return 影响行数
*/
int insertBatch(@Param("entities") List<TabHaobanQywxFeeAccountStaff> entities);
/**
* 修改数据
*
* @param tabHaobanQywxFeeAccountStaff 实例对象
* @return 影响行数
*/
int update(TabHaobanQywxFeeAccountStaff tabHaobanQywxFeeAccountStaff);
/**
* 通过主键删除数据
*
* @param feeAccountId 主键
* @return 影响行数
*/
int deleteById(Long feeAccountId);
/**
* 详情
*
* @param wxEnterpriseId wx企业标识
* @return {@link List }<{@link HaobanQywxFeeDetailDTO }>
* @author mozhu
* @date 2022-08-05 15:40:09
*/
List<HaobanQywxFeeDetailDTO> feeDetail(@Param("wxEnterpriseId") String wxEnterpriseId);
/**
* 获取最新的过期时间
* @param wxEnterpriseId
* @return
*/
Date lastFeeInterceptTime(@Param("wxEnterpriseId") String wxEnterpriseId);
/**
* 未来30天过期拦截数
*
* @param wxEnterpriseId wx企业标识
* @return int
* @author mozhu
* @date 2022-08-08 15:53:32
*/
int lastFeeInterceptCount(@Param("wxEnterpriseId") String wxEnterpriseId);
}
package com.gic.haoban.manage.service.dao.mapper.fee;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDetailDTO;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountStaff;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
/**
* 企业微信收费订单成员激活详情(TabHaobanQywxFeeAccountStaff)表数据库访问层
*
* @author mozhu
* @since 2022-08-03 16:12:31
*/
public interface TabHaobanQywxFeeAccountStaffMapper {
/**
* 通过ID查询单条数据
*
* @param feeAccountId 主键
* @return 实例对象
*/
TabHaobanQywxFeeAccountStaff selectByActiveCode(@Param("wxEnterpriseId")String wxEnterpriseId , @Param("activeCode")String activeCode);
/**
* 新增数据
*
* @param tabHaobanQywxFeeAccountStaff 实例对象
* @return 影响行数
*/
int insert(TabHaobanQywxFeeAccountStaff tabHaobanQywxFeeAccountStaff);
/**
* 修改数据
*
* @param tabHaobanQywxFeeAccountStaff 实例对象
* @return 影响行数
*/
int update(TabHaobanQywxFeeAccountStaff tabHaobanQywxFeeAccountStaff);
/**
* 详情
*
* @param wxEnterpriseId wx企业标识
* @return {@link List }<{@link HaobanQywxFeeDetailDTO }>
* @author mozhu
* @date 2022-08-05 15:40:09
*/
List<HaobanQywxFeeDetailDTO> feeDetail(@Param("wxEnterpriseId") String wxEnterpriseId);
/**
* 获取最新的过期时间
* @param wxEnterpriseId
* @return
*/
Date lastFeeInterceptTime(@Param("wxEnterpriseId") String wxEnterpriseId);
/**
* 未来30天过期拦截数
*
* @param wxEnterpriseId wx企业标识
* @return int
* @author mozhu
* @date 2022-08-08 15:53:32
*/
int lastFeeInterceptCount(@Param("wxEnterpriseId") String wxEnterpriseId);
}
package com.gic.haoban.manage.service.service.fee;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDetailDTO;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountStaff;
import java.util.List;
/**
* 企业微信收费订单成员激活详情(TabHaobanQywxFeeAccountStaff)表服务接口
*
* @author mozhu
* @since 2022-08-03 16:12:32
*/
public interface HaobanQywxFeeAccountStaffService {
/**
* 通过ID查询单条数据
*
* @param feeAccountId 主键
* @return 实例对象
*/
TabHaobanQywxFeeAccountStaff queryById(Long feeAccountId);
/**
* 新增数据
*
* @param tabHaobanQywxFeeAccountStaff 实例对象
* @return 实例对象
*/
TabHaobanQywxFeeAccountStaff insert(TabHaobanQywxFeeAccountStaff tabHaobanQywxFeeAccountStaff);
/**
* 修改数据
*
* @param tabHaobanQywxFeeAccountStaff 实例对象
* @return 实例对象
*/
TabHaobanQywxFeeAccountStaff update(TabHaobanQywxFeeAccountStaff tabHaobanQywxFeeAccountStaff);
/**
* 通过主键删除数据
*
* @param feeAccountId 主键
* @return 是否成功
*/
boolean deleteById(Long feeAccountId);
/**
* 详情
*
* @param wxEnterpriseId wx企业标识
* @return {@link List }<{@link HaobanQywxFeeDetailDTO }>
* @author mozhu
* @date 2022-08-05 15:39:37
*/
List<HaobanQywxFeeDetailDTO> feeDetail(String wxEnterpriseId);
/**
* 费用详细拦截
*
* @param wxEnterpriseId wx企业标识
* @return {@link HaobanQywxFeeDetailDTO }
* @author mozhu
* @date 2022-08-08 15:46:21
*/
HaobanQywxFeeDetailDTO feeIntercept(String wxEnterpriseId);
/**
* 未来30天将拦截数量
*
* @param wxEnterpriseId wx企业标识
* @return int
* @author mozhu
* @date 2022-08-12 13:57:00
*/
int monthWillInterceptNum(String wxEnterpriseId);
}
package com.gic.haoban.manage.service.service.fee;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDetailDTO;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountStaff;
import java.util.List;
/**
* 企业微信收费订单成员激活详情(TabHaobanQywxFeeAccountStaff)表服务接口
*
* @author mozhu
* @since 2022-08-03 16:12:32
*/
public interface HaobanQywxFeeAccountStaffService {
/**
* 新增数据
*
* @param tabHaobanQywxFeeAccountStaff 实例对象
* @return 实例对象
*/
TabHaobanQywxFeeAccountStaff save(TabHaobanQywxFeeAccountStaff tabHaobanQywxFeeAccountStaff);
/**
* 详情
*
* @param wxEnterpriseId wx企业标识
* @return {@link List }<{@link HaobanQywxFeeDetailDTO }>
* @author mozhu
* @date 2022-08-05 15:39:37
*/
List<HaobanQywxFeeDetailDTO> feeDetail(String wxEnterpriseId);
/**
* 费用详细拦截
*
* @param wxEnterpriseId wx企业标识
* @return {@link HaobanQywxFeeDetailDTO }
* @author mozhu
* @date 2022-08-08 15:46:21
*/
HaobanQywxFeeDetailDTO feeIntercept(String wxEnterpriseId);
/**
* 未来30天将拦截数量
*
* @param wxEnterpriseId wx企业标识
* @return int
* @author mozhu
* @date 2022-08-12 13:57:00
*/
int monthWillInterceptNum(String wxEnterpriseId);
}
package com.gic.haoban.manage.service.service.fee.impl;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDetailDTO;
import com.gic.haoban.manage.service.dao.mapper.fee.TabHaobanQywxFeeAccountStaffMapper;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountStaff;
import com.gic.haoban.manage.service.service.fee.HaobanQywxFeeAccountStaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
* 企业微信收费订单成员激活详情(TabHaobanQywxFeeAccountStaff)表服务实现类
*
* @author mozhu
* @since 2022-08-03 16:12:32
*/
@Service
public class HaobanQywxFeeAccountStaffServiceImpl implements HaobanQywxFeeAccountStaffService {
@Autowired
private TabHaobanQywxFeeAccountStaffMapper tabHaobanQywxFeeAccountStaffMapper;
/**
* 通过ID查询单条数据
*
* @param feeAccountId 主键
* @return 实例对象
*/
@Override
public TabHaobanQywxFeeAccountStaff queryById(Long feeAccountId) {
return this.tabHaobanQywxFeeAccountStaffMapper.queryById(feeAccountId);
}
/**
* 新增数据
*
* @param tabHaobanQywxFeeAccountStaff 实例对象
* @return 实例对象
*/
@Override
public TabHaobanQywxFeeAccountStaff insert(TabHaobanQywxFeeAccountStaff tabHaobanQywxFeeAccountStaff) {
this.tabHaobanQywxFeeAccountStaffMapper.insert(tabHaobanQywxFeeAccountStaff);
return tabHaobanQywxFeeAccountStaff;
}
/**
* 修改数据
*
* @param tabHaobanQywxFeeAccountStaff 实例对象
* @return 实例对象
*/
@Override
public TabHaobanQywxFeeAccountStaff update(TabHaobanQywxFeeAccountStaff tabHaobanQywxFeeAccountStaff) {
this.tabHaobanQywxFeeAccountStaffMapper.update(tabHaobanQywxFeeAccountStaff);
return this.queryById(tabHaobanQywxFeeAccountStaff.getFeeAccountStaffId());
}
/**
* 通过主键删除数据
*
* @param feeAccountId 主键
* @return 是否成功
*/
@Override
public boolean deleteById(Long feeAccountId) {
return this.tabHaobanQywxFeeAccountStaffMapper.deleteById(feeAccountId) > 0;
}
@Override
public List<HaobanQywxFeeDetailDTO> feeDetail(String wxEnterpriseId) {
return tabHaobanQywxFeeAccountStaffMapper.feeDetail(wxEnterpriseId);
}
@Override
public HaobanQywxFeeDetailDTO feeIntercept(String wxEnterpriseId) {
Date lastFeeInterceptTime = tabHaobanQywxFeeAccountStaffMapper.lastFeeInterceptTime(wxEnterpriseId);
int count = tabHaobanQywxFeeAccountStaffMapper.lastFeeInterceptCount(wxEnterpriseId);
HaobanQywxFeeDetailDTO haobanQywxFeeDetailDTO = new HaobanQywxFeeDetailDTO();
haobanQywxFeeDetailDTO.setInterceptTime(lastFeeInterceptTime);
haobanQywxFeeDetailDTO.setInterceptUserNum(count);
return haobanQywxFeeDetailDTO;
}
@Override
public int monthWillInterceptNum(String wxEnterpriseId) {
return tabHaobanQywxFeeAccountStaffMapper.lastFeeInterceptCount(wxEnterpriseId);
}
}
package com.gic.haoban.manage.service.service.fee.impl;
import com.gic.haoban.manage.api.dto.fee.HaobanQywxFeeDetailDTO;
import com.gic.haoban.manage.service.dao.mapper.fee.TabHaobanQywxFeeAccountStaffMapper;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountStaff;
import com.gic.haoban.manage.service.service.fee.HaobanQywxFeeAccountStaffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
* 企业微信收费订单成员激活详情(TabHaobanQywxFeeAccountStaff)表服务实现类
*
* @author mozhu
* @since 2022-08-03 16:12:32
*/
@Service
public class HaobanQywxFeeAccountStaffServiceImpl implements HaobanQywxFeeAccountStaffService {
@Autowired
private TabHaobanQywxFeeAccountStaffMapper tabHaobanQywxFeeAccountStaffMapper;
/**
* 新增数据
*
* @param tabHaobanQywxFeeAccountStaff 实例对象
* @return 实例对象
*/
@Override
public TabHaobanQywxFeeAccountStaff save(TabHaobanQywxFeeAccountStaff account) {
TabHaobanQywxFeeAccountStaff old = this.tabHaobanQywxFeeAccountStaffMapper.selectByActiveCode(account.getWxEnterpriseId(), account.getActiveCode()) ;
if(null != old) {
account.setFeeAccountStaffId(old.getFeeAccountStaffId());
this.tabHaobanQywxFeeAccountStaffMapper.update(account) ;
}else {
this.tabHaobanQywxFeeAccountStaffMapper.insert(account);
}
return account ;
}
@Override
public List<HaobanQywxFeeDetailDTO> feeDetail(String wxEnterpriseId) {
return tabHaobanQywxFeeAccountStaffMapper.feeDetail(wxEnterpriseId);
}
@Override
public HaobanQywxFeeDetailDTO feeIntercept(String wxEnterpriseId) {
Date lastFeeInterceptTime = tabHaobanQywxFeeAccountStaffMapper.lastFeeInterceptTime(wxEnterpriseId);
int count = tabHaobanQywxFeeAccountStaffMapper.lastFeeInterceptCount(wxEnterpriseId);
HaobanQywxFeeDetailDTO haobanQywxFeeDetailDTO = new HaobanQywxFeeDetailDTO();
haobanQywxFeeDetailDTO.setInterceptTime(lastFeeInterceptTime);
haobanQywxFeeDetailDTO.setInterceptUserNum(count);
return haobanQywxFeeDetailDTO;
}
@Override
public int monthWillInterceptNum(String wxEnterpriseId) {
return tabHaobanQywxFeeAccountStaffMapper.lastFeeInterceptCount(wxEnterpriseId);
}
}
......@@ -13,6 +13,7 @@ import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSON;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.UniqueIdUtils;
import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.common.utils.PageUtil;
import com.gic.haoban.common.utils.StringUtil;
......@@ -22,7 +23,9 @@ import com.gic.haoban.manage.service.dao.mapper.StaffMapper;
import com.gic.haoban.manage.service.dao.mapper.WxEnterpriseMapper;
import com.gic.haoban.manage.service.entity.TabHaobanStaff;
import com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise;
import com.gic.haoban.manage.service.entity.fee.TabHaobanQywxFeeAccountStaff;
import com.gic.haoban.manage.service.service.StaffService;
import com.gic.haoban.manage.service.service.fee.HaobanQywxFeeAccountStaffService;
import com.gic.wechat.api.dto.qywx.fee.AccountListDTO;
import com.gic.wechat.api.dto.qywx.fee.AccountListResponseDTO;
import com.gic.wechat.api.service.qywx.QywxOrderApiService;
......@@ -30,6 +33,8 @@ import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import cn.hutool.core.date.DateUtil;
@Service
public class StaffServiceImpl implements StaffService {
private static final Logger log = LogManager.getLogger(StaffServiceImpl.class);
......@@ -42,6 +47,8 @@ public class StaffServiceImpl implements StaffService {
private WxEnterpriseMapper wxEnterpriseMapper ;
@Autowired
private Config config ;
@Autowired
private HaobanQywxFeeAccountStaffService haobanQywxFeeAccountStaffService;
@Override
public TabHaobanStaff selectById(String id) {
......@@ -220,6 +227,7 @@ public class StaffServiceImpl implements StaffService {
private void updateAccount(String wxEnterpriseId , List<AccountListDTO> list) {
for(AccountListDTO item : list) {
String userId = item.getUserid() ;
String activeCode = item.getActiveCode() ;
Date start = new Date(item.getActiveTime()*1000L) ;
Date end = new Date(item.getExpireTime()*1000L) ;
TabHaobanStaff staff = this.mapper.selectByUserIdAndEnterpriseId(userId, wxEnterpriseId) ;
......@@ -228,6 +236,16 @@ public class StaffServiceImpl implements StaffService {
}
if(null != staff) {
this.updateActiveStatusById(staff.getStaffId(), start, end, new Date(), 1) ;
TabHaobanQywxFeeAccountStaff accountStaff = new TabHaobanQywxFeeAccountStaff();
accountStaff.setFeeAccountStaffId(UniqueIdUtils.uniqueLong());
accountStaff.setWxEnterpriseId(wxEnterpriseId);
accountStaff.setActiveCode(activeCode);
accountStaff.setStaffId(staff.getStaffId());
accountStaff.setAccountType(item.getType());
accountStaff.setExpireTime(DateUtil.date(item.getExpireTime() * 1000));
accountStaff.setActiveTime(DateUtil.date(item.getActiveTime() * 1000));
this.haobanQywxFeeAccountStaffService.save(accountStaff);
}else {
log.info("查询激活账号,用户不存在,userid={}",userId);
}
......
import cn.hutool.core.thread.ConcurrencyTester;
import cn.hutool.core.thread.ThreadUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.Page;
import com.gic.commons.util.GICMQClientUtil;
import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.manage.api.dto.HandoverExternalDTO;
import com.gic.haoban.manage.api.service.*;
import com.gic.haoban.manage.service.service.StaffService;
import com.gic.haoban.manage.service.service.TestService;
import com.gic.mq.sdk.GicMQClient;
import com.gic.wechat.api.service.qywx.QywxUserApiService;
import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
......@@ -20,8 +9,18 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import java.util.ArrayList;
import java.util.List;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.ctrip.framework.apollo.Config;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.GICMQClientUtil;
import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.manage.api.dto.HandoverExternalDTO;
import com.gic.haoban.manage.api.service.HandoverOperationApiService;
import com.gic.mq.sdk.GicMQClient;
import com.gic.wechat.api.dto.qywx.fee.AccountListResponseDTO;
import com.gic.wechat.api.service.qywx.QywxOrderApiService;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:applicationContext-conf.xml"})
......@@ -31,12 +30,17 @@ public class HandoverTest {
@Autowired
private HandoverOperationApiService handoverOperationApiService;
@Autowired
private QywxOrderApiService qywxOrderApiService ;
@Autowired
private com.gic.haoban.manage.service.config.Config config ;
@Test
public void test() {
String wxEnterpriseId = "e86dbc7f329d41be9db2e3526c9b48c4";
handoverOperationApiService.dealQywxEnterpriseHandover(wxEnterpriseId);
ServiceResponse<AccountListResponseDTO> resp = this.qywxOrderApiService.listActivedAccount(config.getCorpid(), "wp59NLDQAAJL6DsM6YwOGqJlhCBykkeA", 100, null) ;
System.out.println(JSON.toJSONString(resp));
System.out.println("11");
}
@Test
......
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