|
|
@@ -5,10 +5,12 @@ import com.goafanti.common.model.StandardPlatformLink;
|
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
|
import com.goafanti.core.mybatis.page.Pagination;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
+import com.goafanti.standard.bo.InputStandardPlatformLink;
|
|
|
import com.goafanti.standard.service.StandardPlatformLinkService;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
|
|
|
@@ -24,11 +26,14 @@ public class StandardPlatformLinkServiceImpl extends BaseMybatisDao<StandardPlat
|
|
|
private StandardPlatformLinkMapper standardPlatformLinkMapper;
|
|
|
|
|
|
|
|
|
- public Pagination<StandardPlatformLink> list(StandardPlatformLink standardPlatformLink, Integer pageNo, Integer pageSize) {
|
|
|
+ public Pagination<StandardPlatformLink> list(InputStandardPlatformLink in) {
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
|
- params.put("in", standardPlatformLink);
|
|
|
- return (Pagination<StandardPlatformLink>) findPage("findStandardPlatformLinkList",
|
|
|
- "findStandardPlatformLinkCount", params, pageNo, pageSize);
|
|
|
+ if (in.getName() != null)params.put("name", in.getName());
|
|
|
+ if (in.getStatus() != null)params.put("status", in.getStatus());
|
|
|
+ if (in.getStartTime()!= null)params.put("startTime", in.getStartTime());
|
|
|
+ if (in.getEndTime()!= null)params.put("endTime", in.getEndTime()+" 23:59:59");
|
|
|
+ return (Pagination<StandardPlatformLink>) findPage("queryAllByLimit",
|
|
|
+ "queryAllByCount", params, in.getPageNo(), in.getPageSize());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -52,6 +57,9 @@ public class StandardPlatformLinkServiceImpl extends BaseMybatisDao<StandardPlat
|
|
|
@Override
|
|
|
public StandardPlatformLink insert(StandardPlatformLink in) {
|
|
|
in.setAid(TokenManager.getAdminId());
|
|
|
+ Date now = new Date();
|
|
|
+ in.setCreateTime(now);
|
|
|
+ in.setUpdateTime(now);
|
|
|
this.standardPlatformLinkMapper.insert(in);
|
|
|
return in;
|
|
|
}
|
|
|
@@ -64,6 +72,7 @@ public class StandardPlatformLinkServiceImpl extends BaseMybatisDao<StandardPlat
|
|
|
*/
|
|
|
@Override
|
|
|
public StandardPlatformLink update(StandardPlatformLink standardPlatformLink) {
|
|
|
+ standardPlatformLink.setUpdateTime(new Date());
|
|
|
this.standardPlatformLinkMapper.update(standardPlatformLink);
|
|
|
return this.queryById(standardPlatformLink.getId());
|
|
|
}
|