|
|
@ -1,13 +1,16 @@
|
|
|
|
package com.gszc.service.impl;
|
|
|
|
package com.gszc.service.impl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
|
|
|
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
|
|
|
import com.baomidou.mybatisplus.plugins.Page;
|
|
|
|
import com.baomidou.mybatisplus.plugins.Page;
|
|
|
|
|
|
|
|
import com.gszc.entity.Invoice;
|
|
|
|
import com.gszc.entity.InvoiceCategory;
|
|
|
|
import com.gszc.entity.InvoiceCategory;
|
|
|
|
import com.gszc.entity.InvoiceCategory;
|
|
|
|
import com.gszc.entity.InvoiceCategory;
|
|
|
|
import com.gszc.mapper.InvoiceCategoryMapper;
|
|
|
|
import com.gszc.mapper.InvoiceCategoryMapper;
|
|
|
|
import com.gszc.mapper.InvoiceCategoryMapper;
|
|
|
|
import com.gszc.mapper.InvoiceCategoryMapper;
|
|
|
|
import com.gszc.service.IInvoiceCategoryService;
|
|
|
|
import com.gszc.service.IInvoiceCategoryService;
|
|
|
|
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
|
|
|
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
|
|
|
|
|
|
|
import org.apache.ibatis.session.RowBounds;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
|
@ -43,9 +46,13 @@ public class InvoiceCategoryServiceImpl extends ServiceImpl<InvoiceCategoryMappe
|
|
|
|
invoiceCategoryMapper.updateById(invoiceCategory);
|
|
|
|
invoiceCategoryMapper.updateById(invoiceCategory);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public List<InvoiceCategory> queryInvoiceCategory(Integer pageNum, Integer pageSize){
|
|
|
|
public JSONObject queryInvoiceCategory(Integer pageNum, Integer pageSize){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Integer count = invoiceCategoryMapper.selectCount(new EntityWrapper<InvoiceCategory>());
|
|
|
|
List<InvoiceCategory> result = invoiceCategoryMapper.selectPage(new Page<>((pageNum - 1) * pageSize, pageSize), new EntityWrapper<InvoiceCategory>().eq("1", "1").orderBy("id", true));
|
|
|
|
List<InvoiceCategory> result = invoiceCategoryMapper.selectPage(new Page<>((pageNum - 1) * pageSize, pageSize), new EntityWrapper<InvoiceCategory>().eq("1", "1").orderBy("id", true));
|
|
|
|
return result;
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
|
|
|
jsonObject.put("count",count);
|
|
|
|
|
|
|
|
jsonObject.put("data",result);
|
|
|
|
|
|
|
|
return jsonObject;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|