|
@@ -9,6 +9,7 @@ import com.tzld.longarticle.recommend.server.model.vo.GhDetailVo;
|
|
|
import com.tzld.longarticle.recommend.server.repository.model.GhDetail;
|
|
|
import com.tzld.longarticle.recommend.server.repository.model.GhDetailExample;
|
|
|
import com.tzld.longarticle.recommend.server.service.exterior.GhDetailService;
|
|
|
+import com.tzld.longarticle.recommend.server.util.DateUtils;
|
|
|
import com.tzld.longarticle.recommend.server.util.page.Page;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -44,6 +45,7 @@ public class GhDetailServiceImpl implements GhDetailService {
|
|
|
page.setCurrentPage(pageNum);
|
|
|
page.setPageSize(pageSize);
|
|
|
GhDetailExample example = new GhDetailExample();
|
|
|
+ example.setOrderByClause("create_time desc");
|
|
|
GhDetailExample.Criteria criteria = example.createCriteria().andIsDeleteEqualTo(0);
|
|
|
if (StringUtils.isNotEmpty(accountId)) {
|
|
|
criteria.andGhIdEqualTo(accountId);
|
|
@@ -60,6 +62,8 @@ public class GhDetailServiceImpl implements GhDetailService {
|
|
|
ghDetailVo.setAccountId(ghDetail.getGhId());
|
|
|
ghDetailVo.setAccountName(ghDetail.getGhName());
|
|
|
ghDetailVo.setTypeName(GhTypeEnum.getTypeName(ghDetailVo.getType()));
|
|
|
+ ghDetailVo.setCreateTime(DateUtils.getDateString(ghDetail.getCreateTime().getTime(), "yyyy-MM-dd HH:mm:ss"));
|
|
|
+ ghDetailVo.setUpdateTime(DateUtils.getDateString(ghDetail.getUpdateTime().getTime(), "yyyy-MM-dd HH:mm:ss"));
|
|
|
ghDetailVos.add(ghDetailVo);
|
|
|
}
|
|
|
}
|
|
@@ -67,6 +71,8 @@ public class GhDetailServiceImpl implements GhDetailService {
|
|
|
return CommonResponse.success(page);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
@Override
|
|
|
public CommonResponse<Void> addGhDetail(GhDetailVo ghDetailVo) {
|
|
|
if (ghDetailVo == null
|