提交本地工具-标准拆分相关接口

This commit is contained in:
duanwenbin
2021-07-08 11:21:18 +08:00
parent 1ed0888256
commit 2e8a2bba51
55 changed files with 8255 additions and 105 deletions
@@ -157,11 +157,11 @@ public class PersonCollectEOController extends BaseController<PersonCollectEO> {
**/
@ApiOperation(value = "取消收藏")
@PutMapping("/updateByUserId")
// @RequiresPermissions("person:personCollect:updateByUserId")
// @RequiresPermissions("person:personCollect:updateByUserId") PersonCollectEO
public ResponseMessage<PersonCollectEO> updateByUserId(PersonCollectEO personCollectEO) throws Exception {
personCollectEO.setValidFlag(1);
boolean result = personCollectEOService.updateById(personCollectEO);
if(result){
int result = personCollectEOService.updateByPrimaryKeySelective(personCollectEO);
if(result == 1){
return Result.success("0","取消成功",personCollectEO);
} else {
return Result.error("0","取消失败",personCollectEO);
@@ -34,4 +34,6 @@ public interface PersonCollectEODao extends BaseMapper<PersonCollectEO> {
int deleteByResIdList(@Param("idList") List<String> idList);
int updateByPrimaryKeySelective(PersonCollectEO personCollectEO);
}
@@ -20,4 +20,6 @@ public interface IPersonCollectEOService extends IService<PersonCollectEO> {
public int deleteByResId(String resId);
int updateByPrimaryKeySelective(PersonCollectEO personCollectEO) throws Exception;
}
@@ -2,6 +2,7 @@ package com.adc.da.person.service.impl;
import com.adc.da.base.page.BasePage;
import com.adc.da.person.dao.PersonCollectEODao;
import com.adc.da.person.dao.PersonConfEODao;
import com.adc.da.person.dao.PersonNoteEODao;
import com.adc.da.person.entity.PersonCollectEO;
import com.adc.da.person.entity.PersonNoteEO;
@@ -33,6 +34,8 @@ public class PersonCollectEOServiceImpl extends ServiceImpl<PersonCollectEODao,
@Autowired
private PersonNoteEODao personNoteEODao;
@Autowired
private PersonCollectEODao personCollectEODao;
@Override
@@ -96,4 +99,9 @@ public class PersonCollectEOServiceImpl extends ServiceImpl<PersonCollectEODao,
public int deleteByResId(String resId) {
return this.baseMapper.deleteByResId(resId);
}
@Override
public int updateByPrimaryKeySelective(PersonCollectEO personCollectEO) throws Exception{
return personCollectEODao.updateByPrimaryKeySelective(personCollectEO);
}
}
@@ -0,0 +1,93 @@
package com.adc.da.sys.common;
import com.adc.da.base.page.Pager;
public class BasePage extends com.adc.da.base.page.BasePage {
private Integer page = 1;
private Integer pageSize = 10;
private Integer startIndex;
private Integer endIndex;
private String orderBy;
private String order;
private String q;
private Pager pager = new Pager();
public BasePage() {
}
public Pager getPager() {
this.pager.setPageId(this.getPage());
this.pager.setPageSize(this.getPageSize());
String orderField = "";
if (this.orderBy != null && this.orderBy.trim().length() > 0) {
orderField = this.orderBy;
}
if (orderField.trim().length() > 0 && this.order != null && this.order.trim().length() > 0) {
orderField = orderField + " " + this.order;
}
this.pager.setOrderField(orderField);
return this.pager;
}
public void setPager(Pager pager) {
this.pager = pager;
}
public Integer getPage() {
return this.page;
}
public void setPage(Integer page) {
this.page = page;
}
public Integer getPageSize() {
return this.pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
public String getOrderBy() {
return this.orderBy;
}
public void setOrderBy(String orderBy) {
this.orderBy = orderBy;
}
public String getOrder() {
return this.order;
}
public void setOrder(String order) {
this.order = order;
}
public String getQ() {
return this.q;
}
public void setQ(String q) {
this.q = q;
}
public Integer getStartIndex() {
return this.startIndex;
}
public void setStartIndex(Integer startIndex) {
this.startIndex = (this.page - 1) * this.pageSize + 1;
}
public Integer getEndIndex() {
return this.endIndex;
}
public void setEndIndex(Integer endIndex) {
this.endIndex = this.page * this.pageSize;
}
}