修改company/jobNumber
This commit is contained in:
@@ -11,19 +11,19 @@ import java.util.List;
|
||||
@Mapper
|
||||
public interface PerformanceMapper {
|
||||
|
||||
int addPerformanceBaseBatch(@Param("bases") List<PerformanceBase> bases, @Param("company") String company);
|
||||
int addPerformanceBaseBatch(@Param("bases") List<PerformanceBase> bases, @Param("company") Long company);
|
||||
|
||||
int addTaskPerformanceRelateBatch(@Param("relates") List<TaskPerformanceRelate> relates, @Param("company") String company);
|
||||
int addTaskPerformanceRelateBatch(@Param("relates") List<TaskPerformanceRelate> relates, @Param("company") Long company);
|
||||
|
||||
int addPerformanceExpandBatch(@Param("expands") List<PerformanceExpand> expands, @Param("company") String company);
|
||||
int addPerformanceExpandBatch(@Param("expands") List<PerformanceExpand> expands, @Param("company") Long company);
|
||||
|
||||
int updatePerformanceBase(@Param("base") PerformanceBase base, @Param("updater") String updater, @Param("company") String company);
|
||||
int updatePerformanceBase(@Param("base") PerformanceBase base, @Param("updater") Long updater, @Param("company") Long company);
|
||||
|
||||
int updatePerformanceExpand(@Param("expand") PerformanceExpand expand, @Param("updater") String updater, @Param("company") String company);
|
||||
int updatePerformanceExpand(@Param("expand") PerformanceExpand expand, @Param("updater") Long updater, @Param("company") Long company);
|
||||
|
||||
int delPerformanceExpandBatch(@Param("expandIds") List<Long> expandIds, @Param("company") String company);
|
||||
int delPerformanceExpandBatch(@Param("expandIds") List<Long> expandIds, @Param("company") Long company);
|
||||
|
||||
PerformanceBase getPerformanceBaseById(@Param("performanceId") long performanceId, @Param("company") String company);
|
||||
PerformanceBase getPerformanceBaseById(@Param("performanceId") long performanceId, @Param("company") Long company);
|
||||
|
||||
int delPerformanceById(@Param("performanceId") long performanceId, @Param("company") String company);
|
||||
int delPerformanceById(@Param("performanceId") long performanceId, @Param("company") Long company);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public class PerformanceServiceImpl implements PerformanceService {
|
||||
@Transactional
|
||||
@Override
|
||||
public SdmResponse addPerformance(AddPerformanceReq req) {
|
||||
String company = ThreadLocalContext.getCompany();
|
||||
Long company = ThreadLocalContext.getTenantId();
|
||||
int result = performanceMapper.addPerformanceBaseBatch(req.getBases(), company);
|
||||
if (result <= 0) {
|
||||
return SdmResponse.failed("新增指标失败!");
|
||||
@@ -51,8 +51,8 @@ public class PerformanceServiceImpl implements PerformanceService {
|
||||
|
||||
@Override
|
||||
public SdmResponse updatePerformanceBatch(UpdatePerformanceBatchReq req) {
|
||||
String company = ThreadLocalContext.getCompany();
|
||||
String updater = ThreadLocalContext.getJobNumber();
|
||||
Long company = ThreadLocalContext.getTenantId();
|
||||
Long updater = ThreadLocalContext.getUserId();
|
||||
if (!CollectionUtils.isEmpty(req.getBases())) {
|
||||
req.getBases().parallelStream().forEach(performanceBase -> performanceMapper.updatePerformanceBase(performanceBase, updater, company));
|
||||
}
|
||||
@@ -77,7 +77,7 @@ public class PerformanceServiceImpl implements PerformanceService {
|
||||
@Override
|
||||
public SdmResponse delPerformance(DelPerformanceReq req) {
|
||||
// todo 权限控制
|
||||
String company = ThreadLocalContext.getCompany();
|
||||
Long company = ThreadLocalContext.getTenantId();
|
||||
PerformanceBase performanceBase = performanceMapper.getPerformanceBaseById(req.getPerformanceId(), company);
|
||||
if (ObjectUtils.isEmpty(performanceBase)) {
|
||||
return SdmResponse.failed("指标不存在!");
|
||||
|
||||
Reference in New Issue
Block a user