|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.gszc.service.impl;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.mapper.Wrapper;
|
|
|
|
@ -85,12 +86,23 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
|
|
|
|
|
* @param userId
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public List<Custom> invoiceCustomList(String userId){
|
|
|
|
|
public JSONArray invoiceCustomList(String userId){
|
|
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
|
|
|
|
|
|
|
List<Custom> customs = customMapper.selectList(new EntityWrapper<Custom>().eq("mini_user_id", userId).eq("status_code","enable"));
|
|
|
|
|
return customs;
|
|
|
|
|
for(Custom custom:customs){
|
|
|
|
|
List<CustomSupport> customSupports = customSupportMapper.selectList(new EntityWrapper<CustomSupport>().eq("custom_id", custom.getId()));
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
jsonObject.put("custom",custom);
|
|
|
|
|
jsonObject.put("customSupports",customSupports);
|
|
|
|
|
jsonArray.add(jsonObject);
|
|
|
|
|
}
|
|
|
|
|
return jsonArray;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<Custom> customList(String userId,String type){
|
|
|
|
|
public JSONArray customList(String userId,String type){
|
|
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
|
|
|
|
|
|
|
Wrapper<Custom> miniUserId = new EntityWrapper<Custom>().eq("mini_user_id", userId);
|
|
|
|
|
if(null==type){
|
|
|
|
|
|
|
|
|
@ -102,7 +114,14 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
|
|
|
|
|
miniUserId.eq("status_code","enable");
|
|
|
|
|
}
|
|
|
|
|
List<Custom> customs = customMapper.selectList(miniUserId);
|
|
|
|
|
return customs;
|
|
|
|
|
for(Custom custom:customs){
|
|
|
|
|
List<CustomSupport> customSupports = customSupportMapper.selectList(new EntityWrapper<CustomSupport>().eq("custom_id", custom.getId()));
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
jsonObject.put("custom",custom);
|
|
|
|
|
jsonObject.put("customSupports",customSupports);
|
|
|
|
|
jsonArray.add(jsonObject);
|
|
|
|
|
}
|
|
|
|
|
return jsonArray;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public JSONObject customDetail(String customId){
|
|
|
|
|