Commit d1e010f2 by 李传峰

Merge branch 'feature/1007190' into 'release'

Feature/1007190

See merge request rays/pcloud-book!1586
parents 962abfd1 a15b0b65
......@@ -220,4 +220,8 @@ public interface BookAdviserService {
@PostMapping("getAdviserBookStatis")
ResponseEntity<ResponseDto<Map<Long, AdviserBookStatisDto>>> getAdviserBookStatis(@RequestBody AdviserBookStatisRequestDto requestDto);
@ApiOperation("编辑创建书刊数量")
@GetMapping("getBookCreateCount")
ResponseEntity<ResponseDto<Integer>> getBookCreateCount(@RequestParam("adviserId") Long adviserId,
@RequestParam(value = "startTime",required = false) String startTime);
}
......@@ -521,4 +521,6 @@ public interface BookAdviserBiz {
* @return
*/
PageBeanNew<ErpAdviserBookVO> listAdviserBook4Erp4ES(String isbn, String uniqueNumber, String adviserName, Long agentId, Integer currentPage, Integer numPerPage);
Integer getBookCreateCount(Long adviserId, String startTime);
}
......@@ -3760,4 +3760,13 @@ public class BookAdviserBizImpl implements BookAdviserBiz {
}
return pageBeanNew;
}
@Override
public Integer getBookCreateCount(Long adviserId, String startTime) {
if (null == adviserId) {
return 0;
}
Integer count = bookAdviserDao.getBookCreateCount(adviserId,startTime);
return count;
}
}
......@@ -359,4 +359,6 @@ public interface BookAdviserDao extends BaseDao<BookAdviser> {
List<AdviserBookStatisDto> getAdviserBookStatis(AdviserBookStatisRequestDto requestDto);
Integer getBookIsOpenCatalog(Long bookId, Long channelId, Long adviserId);
Integer getBookCreateCount(Long adviserId, String startTime);
}
......@@ -556,4 +556,12 @@ public class BookAdviserDaoImpl extends BaseDaoImpl<BookAdviser> implements Book
paramMap.put("adviserId", adviserId);
return getSessionTemplate().selectOne(getStatement("getBookIsOpenCatalog"), paramMap);
}
@Override
public Integer getBookCreateCount(Long adviserId, String startTime) {
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("adviserId",adviserId);
paramMap.put("startTime", startTime);
return getSessionTemplate().selectOne(getStatement("getBookCreateCount"), paramMap);
}
}
......@@ -27,7 +27,6 @@ import com.pcloud.common.dto.ResponseDto;
import com.pcloud.common.exceptions.BizException;
import com.pcloud.common.page.PageBeanNew;
import com.pcloud.common.utils.ResponseHandleUtil;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -258,4 +257,12 @@ public class BookAdviserServiceImpl implements BookAdviserService {
public ResponseEntity<ResponseDto<Map<Long, AdviserBookStatisDto>>> getAdviserBookStatis(AdviserBookStatisRequestDto requestDto) {
return ResponseHandleUtil.toResponse(bookAdviserBiz.getAdviserBookStatis(requestDto));
}
@Override
@GetMapping("getBookCreateCount")
public ResponseEntity<ResponseDto<Integer>> getBookCreateCount(@RequestParam("adviserId") Long adviserId,
@RequestParam(value = "startTime",required = false) String startTime) {
Integer count = bookAdviserBiz.getBookCreateCount(adviserId, startTime);
return ResponseHandleUtil.toResponse(count);
}
}
......@@ -1432,4 +1432,15 @@
book_adviser_id = #{bookAdviserId}
</update>
<select id="getBookCreateCount" resultType="integer" parameterType="map">
SELECT
COUNT(1)
FROM
book_adviser
WHERE
ADVISER_ID = #{adviserId}
<if test="startTime != null">
AND CREATED_DATE > #{startTime}
</if>
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment