|
|
@@ -579,7 +579,7 @@ public class OrganServiceImpl implements IOrganService {
|
|
|
} else {
|
|
|
roletype.add(role);
|
|
|
}
|
|
|
- List<Market> markets = iMarketMapper.getMarketsNameByUseridAndrole(userid, roletype,null);
|
|
|
+ List<Market> markets = iMarketMapper.getMarketsNameByUseridAndrole(userid, roletype, null);
|
|
|
result.setMarkets(markets);
|
|
|
} else if (role == SysEnums.OrganRole.industry.getCode().intValue()) {
|
|
|
String sm = iCommonService.getSysparmById(SysConstants.SYSPAMA_CODE_NINESERVENNINE);
|
|
|
@@ -588,7 +588,7 @@ public class OrganServiceImpl implements IOrganService {
|
|
|
//会员 已选市场
|
|
|
List<Integer> roletype = new ArrayList<Integer>();
|
|
|
roletype.add(6);
|
|
|
- List<Market> markets = iMarketMapper.getMarketsNameByUseridAndrole(userid, roletype,null);
|
|
|
+ List<Market> markets = iMarketMapper.getMarketsNameByUseridAndrole(userid, roletype, null);
|
|
|
result.setMarkets(markets);
|
|
|
}
|
|
|
} else if (role == SysEnums.OrganRole.marketer.getCode().intValue()) {
|
|
|
@@ -720,8 +720,9 @@ public class OrganServiceImpl implements IOrganService {
|
|
|
iArearolemarketMapper.delete(new QueryWrapper<Arearolemarket>().eq("areauserid", areaid).eq("roletype", role));
|
|
|
|
|
|
Useraccount uc = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", areaid));
|
|
|
- iTaaccountmarketMapper.delete(new QueryWrapper<Taaccountmarket>().eq("accountid", uc.getReckonaccountid()));
|
|
|
-
|
|
|
+ if (uc.getReckonaccountid() != null) {
|
|
|
+ iTaaccountmarketMapper.delete(new QueryWrapper<Taaccountmarket>().eq("accountid", uc.getReckonaccountid()));
|
|
|
+ }
|
|
|
//Ms_ExtendRole
|
|
|
iMsExtendroleMapper.delete(new QueryWrapper<MsExtendrole>().eq("areauserid", areaid).eq("roletypeid", 4L));
|
|
|
|
|
|
@@ -780,8 +781,9 @@ public class OrganServiceImpl implements IOrganService {
|
|
|
}
|
|
|
// 更新parentuserid为平台
|
|
|
Useraccount ua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", areaid));
|
|
|
- iTaaccountmarketMapper.delete(new QueryWrapper<Taaccountmarket>().eq("accountid", ua.getReckonaccountid()));
|
|
|
-
|
|
|
+ if (ua.getReckonaccountid() != null) {
|
|
|
+ iTaaccountmarketMapper.delete(new QueryWrapper<Taaccountmarket>().eq("accountid", ua.getReckonaccountid()));
|
|
|
+ }
|
|
|
return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
} else if (role == SysEnums.OrganRole.marketer.getCode().intValue()) {
|
|
|
@@ -800,7 +802,9 @@ public class OrganServiceImpl implements IOrganService {
|
|
|
iArearolemarketMapper.delete(new QueryWrapper<Arearolemarket>().eq("areauserid", areaid).eq("roletype", 6));
|
|
|
|
|
|
Useraccount ua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", areaid));
|
|
|
- iTaaccountmarketMapper.delete(new QueryWrapper<Taaccountmarket>().eq("accountid", ua.getReckonaccountid()));
|
|
|
+ if (ua.getReckonaccountid() != null) {
|
|
|
+ iTaaccountmarketMapper.delete(new QueryWrapper<Taaccountmarket>().eq("accountid", ua.getReckonaccountid()));
|
|
|
+ }
|
|
|
|
|
|
// 6 9 两个角色
|
|
|
List<Integer> rs = new ArrayList<>();
|
|
|
@@ -994,6 +998,10 @@ public class OrganServiceImpl implements IOrganService {
|
|
|
return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_034.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
|
|
|
+ if (vo.getAccountid() == null || CollectionUtils.isEmpty(vo.getAccountids())) {
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_036.getCode(), request.getHeader("Accept-Language"));
|
|
|
+ }
|
|
|
+
|
|
|
if (vo.getType() == 1) {//新增
|
|
|
if (vo.getRoleid() <= 5) {
|
|
|
addAreaRoleModifyFee(vo, systemmanager, request);
|
|
|
@@ -1635,7 +1643,7 @@ public class OrganServiceImpl implements IOrganService {
|
|
|
public AjaxResult<OrganInitAccountAddResult> loadSelectOption(PersonalizationDelParam param, HttpServletRequest request) {
|
|
|
OrganInitAccountAddResult result = new OrganInitAccountAddResult();
|
|
|
Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
|
|
|
- if(param.getMemberuserid() == 1){
|
|
|
+ if (param.getMemberuserid() == 1) {
|
|
|
if (param.getGoodsid() != null) {
|
|
|
param.setMemberuserid(systemmanager.getAreauserid());
|
|
|
}
|
|
|
@@ -1646,7 +1654,7 @@ public class OrganServiceImpl implements IOrganService {
|
|
|
result.setResults(bzResults);
|
|
|
List<FeesConfigVo> tradeFeeDescriptions = iUseraccountMapper.getTradeFeeDescriptions(param);
|
|
|
for (FeesConfigVo tradeFeeDescription : tradeFeeDescriptions) {
|
|
|
- if(tradeFeeDescription.getFeealgorithm() == 1){
|
|
|
+ if (tradeFeeDescription.getFeealgorithm() == 1) {
|
|
|
tradeFeeDescription.setExchangevalue(tradeFeeDescription.getExchangevalue().multiply(new BigDecimal("10000")));
|
|
|
tradeFeeDescription.setMembermaxvalue(tradeFeeDescription.getMembermaxvalue().multiply(new BigDecimal("10000")));
|
|
|
tradeFeeDescription.setMemberminvalue(tradeFeeDescription.getMemberminvalue().multiply(new BigDecimal("10000")));
|
|
|
@@ -1658,7 +1666,7 @@ public class OrganServiceImpl implements IOrganService {
|
|
|
List<Goods> goods = iGoodsMapper.getNoTradeConfigGoodsForAccount(param);
|
|
|
result.setGoods(goods);
|
|
|
} else if (param.getAccountid() != null) {
|
|
|
- if(param.getMemberuserid() == 1){
|
|
|
+ if (param.getMemberuserid() == 1) {
|
|
|
param.setAccountid(null);
|
|
|
param.setMemberuserid(null);
|
|
|
}
|
|
|
@@ -1910,7 +1918,7 @@ public class OrganServiceImpl implements IOrganService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public AjaxResult<String> getOragnDefaultManager(Long userid, HttpServletRequest request) {
|
|
|
+ public AjaxResult<String> getOragnDefaultManager(Long userid, HttpServletRequest request) {
|
|
|
Systemmanager user = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>()
|
|
|
.eq("areauserid", userid)
|
|
|
.eq("isdefault", 1));
|
|
|
@@ -2050,7 +2058,6 @@ public class OrganServiceImpl implements IOrganService {
|
|
|
//更新资金账户市场权限
|
|
|
iTaaccountMapper.deleteUserMarket(vo.getUserid(), marketids);
|
|
|
|
|
|
- Map<String, Object> properties = new HashMap<String, Object>();
|
|
|
if (CollectionUtils.isNotEmpty(marketids)) {
|
|
|
Taaccount ta = iTaaccountMapper.selectOne(new QueryWrapper<Taaccount>().eq("userid", vo.getUserid()).eq("ismain", 1));
|
|
|
iTaaccountmarketMapper.delete(new QueryWrapper<Taaccountmarket>().eq("accountid", ta.getAccountid()));
|