Compare commits

..

2 Commits

@ -86,6 +86,7 @@ public class BusinessScCourseTypeService {
public APIResponse addScCourseType(ScCourseType scCourseType) {
LoginUser loginUser = SecurityUtils.getLoginUser();
scCourseType.setCreateUser(loginUser.getUserId());
scCourseType.setTenantId(loginUser.getNowTenantId());
boolean addScCourseType = scCourseTypeService.save(scCourseType);
if (addScCourseType) {
return APIResponse.toOkResponse();

@ -25,12 +25,12 @@ public class ScCommissionPlansController {
@PostMapping("list")
public AjaxResult list(@RequestBody Map<String,Object> params){
RespPage<ScCommissionPlans> page = new RespPage<>((Integer) params.get("pageNum"), (Integer) params.get("pageSize"));
service.page(page, Wrappers.<ScCommissionPlans>lambdaQuery()
RespPage<ScCommissionPlans> page1 = service.page(page, Wrappers.<ScCommissionPlans>lambdaQuery()
.eq(StrUtil.isNotEmpty((CharSequence) params.get("planName")),
ScCommissionPlans::getPlanName, params.get("planName"))
.eq(ObjectUtil.isNotEmpty(params.get("isActive")), ScCommissionPlans::getIsActive, params.get("isActive"))
);
return AjaxResult.success();
return AjaxResult.success(page1);
}
@PostMapping("saveOrEdit")

@ -0,0 +1,30 @@
package cn.xluobo.business.sc.salary.repo.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
/**
*
*/
@Getter
@Setter
@TableName("sc_commission_info")
public class CommissionInfo {
@TableId(type = IdType.AUTO)
private Integer id;
private Integer tenantId;
private Long schoolId;
private String schoolName;
private Integer courseId;
private Integer courseName;
}

@ -14,7 +14,7 @@ public class ReqUpdateUserRole implements Serializable {
private Long userId;
private Long tenantId;
private String tenantId;
/**
* Id

@ -30,6 +30,6 @@ public class SysUserDept {
*
*/
@TableField("tenant_id")
private Long tenantId;
private String tenantId;
}

@ -19,5 +19,5 @@ public class SysUserTenant implements Serializable {
private Long userId;
@TableField("tenant_id")
private Long tenantId;
private String tenantId;
}

@ -16,7 +16,7 @@ import java.util.List;
*/
public interface ISysRoleMapper extends BaseMapper<SysRole> {
List<SysRole> selectUserRoleList(@Param("userId")Long userId, @Param("tenantId")Long tenantId);
List<SysRole> selectUserRoleList(@Param("userId")Long userId, @Param("tenantId")String tenantId);
/**
* Id
@ -25,5 +25,5 @@ public interface ISysRoleMapper extends BaseMapper<SysRole> {
* @param tenantId
* @return
*/
List<String> selectUserRoleTreeIdList(@Param("userId")Long userId, @Param("tenantId")Long tenantId);
List<String> selectUserRoleTreeIdList(@Param("userId")Long userId, @Param("tenantId")String tenantId);
}

@ -24,6 +24,6 @@ public interface ISysRoleMenuService extends IService<SysRoleMenu> {
* @return
*/
@CacheEvict(value = "USER_PERMISSION_META", allEntries = true)
void updateRoleMenu(SysRole sysRole, Long nowTenantId);
void updateRoleMenu(SysRole sysRole, String nowTenantId);
}

@ -15,7 +15,7 @@ import java.util.List;
*/
public interface ISysRoleService extends IService<SysRole> {
List<SysRole> selectUserRoleList(Long userId, Long tenantId);
List<SysRole> selectUserRoleList(Long userId, String tenantId);
/**
*
@ -43,7 +43,7 @@ public interface ISysRoleService extends IService<SysRole> {
* @param tenantId
* @return
*/
List<String> selectUserRoleTreeIdList(Long userId, Long tenantId);
List<String> selectUserRoleTreeIdList(Long userId, String tenantId);
/**
*

@ -23,7 +23,7 @@ import java.util.List;
public class ISysRoleMenuServiceImpl extends ServiceImpl<ISysRoleMenuMapper, SysRoleMenu> implements ISysRoleMenuService {
@Override
public void updateRoleMenu(SysRole sysRole, Long nowTenantId) {
public void updateRoleMenu(SysRole sysRole, String nowTenantId) {
//角色菜单关系
UpdateWrapper uw = new UpdateWrapper<>();
uw.eq("role_id",sysRole.getRoleId());

@ -21,7 +21,7 @@ import java.util.List;
public class ISysRoleServiceImpl extends ServiceImpl<ISysRoleMapper, SysRole> implements ISysRoleService {
@Override
public List<SysRole> selectUserRoleList(Long userId, Long tenantId) {
public List<SysRole> selectUserRoleList(Long userId, String tenantId) {
return baseMapper.selectUserRoleList(userId, tenantId);
}
@ -62,7 +62,7 @@ public class ISysRoleServiceImpl extends ServiceImpl<ISysRoleMapper, SysRole> im
}
@Override
public List<String> selectUserRoleTreeIdList(Long userId, Long tenantId) {
public List<String> selectUserRoleTreeIdList(Long userId, String tenantId) {
return baseMapper.selectUserRoleTreeIdList(userId, tenantId);
}

@ -20,6 +20,6 @@ public interface ISysTagService extends com.baomidou.mybatisplus.extension.servi
* @param tenantId
* @param userId
*/
void autoCreateTag(String[] tags, String tagType, Long tenantId, Long userId);
void autoCreateTag(String[] tags, String tagType, String tenantId, Long userId);
}

@ -19,7 +19,7 @@ import org.springframework.stereotype.Service;
public class SysTagServiceImpl extends ServiceImpl<SysTagMapper, SysTag> implements ISysTagService {
@Override
public void autoCreateTag(String[] tags, String tagType, Long tenantId, Long userId) {
public void autoCreateTag(String[] tags, String tagType, String tenantId, Long userId) {
for (String tag : tags) {
QueryWrapper qw = new QueryWrapper();
qw.eq("tenant_id", tenantId);

@ -33,7 +33,7 @@ public class WechatCpAccount implements Serializable {
*
*/
@TableField("tenant_id")
private Long tenantId;
private String tenantId;
/**
*

@ -66,7 +66,7 @@ public class WechatCpSyncService {
*
*/
@Async
public void syncSelfWechatCpContact(Long tenantId) {
public void syncSelfWechatCpContact(String tenantId) {
try {
TenantContextHolder.setTenant(tenantId);
@ -95,7 +95,7 @@ public class WechatCpSyncService {
*
*/
@Async
public void syncSelfWechatCpTag(Long tenantId) {
public void syncSelfWechatCpTag(String tenantId) {
try {
TenantContextHolder.setTenant(tenantId);
@ -135,7 +135,7 @@ public class WechatCpSyncService {
* @param tenantId
*/
@Async
public void syncSelfWechatCpUser(Long tenantId) {
public void syncSelfWechatCpUser(String tenantId) {
try {
TenantContextHolder.setTenant(tenantId);

@ -8,7 +8,7 @@ import org.apache.commons.lang3.StringUtils;
*
*/
public class TenantContextHolder {
private static ThreadLocal<Long> tenantThreadLocal = new ThreadLocal<>();
private static ThreadLocal<String> tenantThreadLocal = new ThreadLocal<>();
/**
* remove()
@ -16,12 +16,12 @@ public class TenantContextHolder {
* remove() , getTenant()tenantThreadLocal(线)
* @param scheme
*/
public static final void setTenant(Long scheme) {
public static final void setTenant(String scheme) {
tenantThreadLocal.set(scheme);
}
public static final Long getTenant() {
Long tenantId = tenantThreadLocal.get();
public static final String getTenant() {
String tenantId = tenantThreadLocal.get();
if (ObjectUtil.isEmpty(tenantId)) {
return SecurityUtils.getLoginUser().getNowTenantId();
}

@ -66,7 +66,7 @@ public class LoginUser implements UserDetails
@Getter
@Setter
private Long nowTenantId;
private String nowTenantId;
/**
*

Loading…
Cancel
Save