|
|
|
@ -8,8 +8,10 @@ import au.com.royalpay.payment.manage.system.core.ClientContractService;
|
|
|
|
|
import au.com.royalpay.payment.tools.env.SysConfigManager;
|
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.NotFoundException;
|
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
|
|
|
|
|
import au.com.royalpay.payment.tools.utils.PageListUtils;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.time.DateUtils;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
@ -101,7 +103,7 @@ public class ClientContractServiceImpl implements ClientContractService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public JSONObject getClientContractExpire(int client_id,String channel) {
|
|
|
|
|
public JSONObject getClientContractExpire(int client_id, String channel) {
|
|
|
|
|
JSONObject client = clientManager.getClientInfo(client_id);
|
|
|
|
|
if (client == null) {
|
|
|
|
|
throw new NotFoundException("merchant not found please check ID");
|
|
|
|
@ -130,7 +132,21 @@ public class ClientContractServiceImpl implements ClientContractService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<JSONObject> list() {
|
|
|
|
|
return clientsContractMapper.listWithClientInfo();
|
|
|
|
|
public JSONObject list(PageBounds pagination) {
|
|
|
|
|
return PageListUtils.buildPageListResult(clientsContractMapper.listWithClientInfo(pagination));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public JSONObject analysis() {
|
|
|
|
|
List<JSONObject> contractAnalysis =clientsContractMapper.analysisSingstatus();
|
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
|
for (JSONObject jsonObject : contractAnalysis) {
|
|
|
|
|
if(jsonObject.getIntValue("has_sign")==1){
|
|
|
|
|
result.put("has_sign",jsonObject.getIntValue("count"));
|
|
|
|
|
}else {
|
|
|
|
|
result.put("not_sign",jsonObject.getIntValue("count"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|