|
|
@@ -770,11 +770,14 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
|
|
|
*/
|
|
|
@Override
|
|
|
public List<InquiryMessage> getMessageList(Long enuu, Integer size) {
|
|
|
- if (size == 0) {
|
|
|
+ if (size == 0 || size == null) {
|
|
|
size = 10;
|
|
|
}
|
|
|
- String sql = "select * from (select p.id_id id, p.id_prid productId, p.id_date as date, i.in_enuu enuu from purc$puinquiryitems p left join purc$puinquiry i on i.in_id = p.id_inid where i.in_isopen = 1 and i.in_enuu <> " +
|
|
|
- enuu + " and COALESCE(p.id_overdue, 0) <> 1 order by p.id_id desc) i limit " + size;
|
|
|
+ String sql = "select * from (select p.id_id id, p.id_prid productId, p.id_date as date, i.in_enuu enuu from purc$puinquiryitems p left join purc$puinquiry i on i.in_id = p.id_inid where i.in_isopen = 1";
|
|
|
+ if (enuu != null) {
|
|
|
+ sql = sql + " and i.in_enuu <> " + enuu ;
|
|
|
+ }
|
|
|
+ sql = sql + " and COALESCE(p.id_overdue, 0) <> 1 order by p.id_id desc) i limit " + size;
|
|
|
List<PurcInquiryItem> items = jdbcTemplate.query(sql, new BeanPropertyRowMapper<PurcInquiryItem>(PurcInquiryItem.class));
|
|
|
List<InquiryMessage> messages = new ArrayList<InquiryMessage>();
|
|
|
if (!CollectionUtils.isEmpty(items)) {
|