|
@@ -88,6 +88,8 @@ public class AppUserService extends ServiceImpl<AppUserMapper, AppUser> implemen
|
|
|
@Autowired
|
|
|
private LevelOneServerInterface levelOneServerInterface;
|
|
|
@Autowired
|
|
|
+ private LevelTwoServerInterface levelTwoServerInterface;
|
|
|
+ @Autowired
|
|
|
private TransportInterface transportInterface;
|
|
|
@Autowired
|
|
|
AppUserLoginLogService appUserLoginLogService;
|
|
@@ -487,6 +489,63 @@ public class AppUserService extends ServiceImpl<AppUserMapper, AppUser> implemen
|
|
|
return 1 == appUserMapper.updateById(appUser);
|
|
|
}
|
|
|
|
|
|
+ /** 获取银行卡信息 */
|
|
|
+ public SoMap getBankInfo() {
|
|
|
+ SoMap so = new SoMap();
|
|
|
+ Integer userType = StpAPPUserUtil.getAPPLoginInfo().getUserType();
|
|
|
+ Long fk = StpAPPUserUtil.getAPPLoginInfo().getFk();
|
|
|
+
|
|
|
+ //1=普通边民,2=边民组长,3=收购商,4=司机,5=外籍商户,6=合作社
|
|
|
+ if(1 == userType || 2 == userType) {
|
|
|
+ PeopleDto peopleDto = levelOneServerInterface.getRpcById(fk);
|
|
|
+ so.put("bankName",peopleDto.getBankName());
|
|
|
+ so.put("bankAccount",peopleDto.getBankCode());
|
|
|
+ }
|
|
|
+ else if(3 == userType) {
|
|
|
+ PurchaserDto purchaserDto = levelTwoServerInterface.getByPurchaserId(fk);
|
|
|
+ so.put("bankName",purchaserDto.getBankName());
|
|
|
+ so.put("bankAccount",purchaserDto.getBankAccount());
|
|
|
+ }
|
|
|
+ else if(5 == userType) {
|
|
|
+ EnterpriseDto enterpriseDto = levelOneServerInterface.getEnterpriseById(fk);
|
|
|
+ so.put("bankName",enterpriseDto.getBank());
|
|
|
+ so.put("bankAccount",enterpriseDto.getBankAccount());
|
|
|
+ }
|
|
|
+ else if(6 == userType) {
|
|
|
+ CooperativeDto cooperativeDto = levelOneServerInterface.getCooperativeById(fk);
|
|
|
+ so.put("bankName",cooperativeDto.getBankName());
|
|
|
+ so.put("bankAccount",cooperativeDto.getBankAccount());
|
|
|
+ }
|
|
|
+ return so;
|
|
|
+ }
|
|
|
+
|
|
|
+ /** 保存银行卡信息 */
|
|
|
+ public boolean saveBankInfo(SoMap so) {
|
|
|
+ Integer userType = StpAPPUserUtil.getAPPLoginInfo().getUserType();
|
|
|
+ Long fk = StpAPPUserUtil.getAPPLoginInfo().getFk();
|
|
|
+ String bankName = so.getString("bankName");
|
|
|
+ String bankAccount = so.getString("bankAccount");
|
|
|
+
|
|
|
+ //1=普通边民,2=边民组长,3=收购商,4=司机,5=外籍商户,6=合作社
|
|
|
+ if(1 == userType || 2 == userType) {
|
|
|
+ boolean result = levelOneServerInterface.saveBankByPeople(fk, bankName, bankAccount);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ else if(3 == userType) {
|
|
|
+ boolean result = levelTwoServerInterface.saveBankByPurchaser(fk, bankName, bankAccount);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ else if(5 == userType) {
|
|
|
+ boolean result = levelOneServerInterface.saveBankByEnterprise(fk, bankName, bankAccount);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ else if(6 == userType) {
|
|
|
+ boolean result = levelOneServerInterface.saveBankByCooperative(fk, bankName, bankAccount);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 远程调用: 收购商认证
|
|
|
*/
|