标准新增以及编辑时 代替标准号在我的收藏中时,此标准也将插入我的收藏
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.person.dao;
|
||||
|
||||
import com.adc.da.base.page.BasePage;
|
||||
import com.adc.da.person.entity.StandInfo;
|
||||
import com.adc.da.person.entity.TsPersonCollect;
|
||||
import com.adc.da.person.page.PersonCollectEOPage;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
@@ -38,4 +39,5 @@ public interface PersonCollectEODao extends BaseMapper<TsPersonCollect> {
|
||||
|
||||
int updateByPrimaryKeySelective(TsPersonCollect tsPersonCollect);
|
||||
|
||||
int countPersonCollectByStandInfo(StandInfo standInfo);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.adc.da.person.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class StandInfo {
|
||||
|
||||
private String userId;
|
||||
|
||||
private String standCode;
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.adc.da.person.service;
|
||||
|
||||
import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.person.entity.StandInfo;
|
||||
import com.adc.da.person.entity.TsPersonCollect;
|
||||
import com.adc.da.person.page.PersonCollectEOPage;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -29,4 +30,10 @@ public interface IPersonCollectEOService extends IService<TsPersonCollect> {
|
||||
|
||||
public ResponseMessage<IPage<TsPersonCollect>> queryCollectByWrapper(Integer pageNo, Integer pageSize, String collectTitle,String modeType, String userId);
|
||||
|
||||
/**
|
||||
* 通过标准号和用户id查询是否收藏此标准
|
||||
* @param standInfo
|
||||
* @return
|
||||
*/
|
||||
public int countPersonCollectByStandInfo(StandInfo standInfo);
|
||||
}
|
||||
|
||||
+6
@@ -5,6 +5,7 @@ import com.adc.da.http.ResponseMessage;
|
||||
import com.adc.da.http.Result;
|
||||
import com.adc.da.person.dao.PersonCollectEODao;
|
||||
import com.adc.da.person.dao.PersonNoteEODao;
|
||||
import com.adc.da.person.entity.StandInfo;
|
||||
import com.adc.da.person.entity.TsPersonCollect;
|
||||
import com.adc.da.person.entity.PersonNoteEO;
|
||||
import com.adc.da.person.page.PersonCollectEOPage;
|
||||
@@ -156,4 +157,9 @@ public class PersonCollectEOServiceImpl extends ServiceImpl<PersonCollectEODao,
|
||||
return Result.success(page);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int countPersonCollectByStandInfo(StandInfo standInfo) {
|
||||
return personCollectEODao.countPersonCollectByStandInfo(standInfo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user