ky 5 years ago
parent ebe31b28c0
commit 8ce954ae74

@ -102,15 +102,19 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
public JSONArray customList(String userId,String type){ public JSONArray customList(String userId,String type){
JSONArray jsonArray = new JSONArray(); JSONArray jsonArray = new JSONArray();
Wrapper<Custom> miniUserId = new EntityWrapper<Custom>().eq("mini_user_id", userId).ne("status_code","logout"); Wrapper<Custom> miniUserId = new EntityWrapper<Custom>().eq("mini_user_id", userId);
if(null==type){ if(null==type){
miniUserId.ne("status_code","logout");
if(type.equals("todo")){
miniUserId.eq("status_code","todo");
}else if(type.equals("disable")){
miniUserId.eq("status_code","disable");
}else if(type.equals("enable")){
miniUserId.eq("status_code","enable");
}
}else if(type.equals("all")){
}else if(type.equals("todo")){
miniUserId.eq("status_code","todo");
}else if(type.equals("disable")){
miniUserId.eq("status_code","disable");
}else if(type.equals("enable")){
miniUserId.eq("status_code","enable");
} }
miniUserId.orderBy("create_date", false); miniUserId.orderBy("create_date", false);
List<Custom> customs = customMapper.selectList(miniUserId); List<Custom> customs = customMapper.selectList(miniUserId);

@ -87,7 +87,7 @@ public class InvoiceServiceImpl extends ServiceImpl<InvoiceMapper, Invoice> impl
public List<Invoice> invoiceList(String userId, String type) { public List<Invoice> invoiceList(String userId, String type) {
List<Invoice> list = new ArrayList<>(); List<Invoice> list = new ArrayList<>();
JSONArray customs = customService.customList(userId, null); JSONArray customs = customService.customList(userId, "all");
for (int i = 0; i < customs.size(); i++) { for (int i = 0; i < customs.size(); i++) {
Wrapper<Invoice> customId = new EntityWrapper<Invoice>().eq("custom_id", customs.getJSONObject(i).getJSONObject("custom").getString("id")); Wrapper<Invoice> customId = new EntityWrapper<Invoice>().eq("custom_id", customs.getJSONObject(i).getJSONObject("custom").getString("id"));
if (null == type) { if (null == type) {

Loading…
Cancel
Save