|
@@ -86,8 +86,12 @@ public class AppCoureseServiceImpl extends ServiceImpl<AppCoursesMapper, AppCour
|
|
|
public Boolean saveWitchPriceRules(AppCoursesDTO appCoursesDTO) {
|
|
|
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
SysDepart depart = sysDepartMapper.selectOne(Wrappers.lambdaQuery(SysDepart.class).eq(SysDepart::getOrgCode, loginUser.getOrgCode()).last("limit 1"));
|
|
|
+ String deptId = depart.getId();
|
|
|
+ if(depart.getSystemType() == 2){
|
|
|
+ deptId = depart.getParentId();
|
|
|
+ }
|
|
|
if (depart.getSystemType() != 0) {
|
|
|
- SeparateAccounts separateAccounts = separateAccountsMapper.selectOne(Wrappers.lambdaQuery(SeparateAccounts.class).eq(SeparateAccounts::getDeptId, depart.getId()));
|
|
|
+ SeparateAccounts separateAccounts = separateAccountsMapper.selectOne(Wrappers.lambdaQuery(SeparateAccounts.class).eq(SeparateAccounts::getDeptId, deptId));
|
|
|
if (ObjectUtil.isEmpty(separateAccounts)) {
|
|
|
throw new JeecgBootException("商户分账比例信息未配置!");
|
|
|
}
|