devtools:addaliexport

master
luoyang14z7 6 years ago
parent 9e9f472f3d
commit ec3139d99c

@ -10,8 +10,11 @@ import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
import au.com.royalpay.payment.core.exceptions.OrderNotExistsException;
import au.com.royalpay.payment.manage.analysis.core.PlatformClearService;
import au.com.royalpay.payment.manage.appclient.core.RetailAppService;
import au.com.royalpay.payment.manage.dev.bean.AliExcel;
import au.com.royalpay.payment.manage.dev.bean.Message;
import au.com.royalpay.payment.manage.dev.bean.SendWechatMessage;
import au.com.royalpay.payment.manage.dev.core.AliforexcelService;
import au.com.royalpay.payment.manage.dev.core.NewpartnerService;
import au.com.royalpay.payment.manage.dev.core.WechatMessageService;
import au.com.royalpay.payment.manage.mappers.customers.CustomerEncourageMoneyUseLogMapper;
import au.com.royalpay.payment.manage.mappers.log.NotifyErrorLogMapper;
@ -30,11 +33,9 @@ import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.tools.utils.PdfUtils;
import au.com.royalpay.payment.tools.utils.TimeZoneUtils;
import au.com.royalpay.payment.tools.utils.XmlFormatUtils;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.dom4j.Element;
import org.slf4j.Logger;
@ -44,14 +45,12 @@ import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ApplicationEventPublisherAware;
import org.springframework.util.Assert;
import org.springframework.validation.Errors;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
@ -60,11 +59,6 @@ import java.net.URISyntaxException;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
/**
* Created by yixian on 2016-07-06.
*/
@ -109,6 +103,10 @@ public class TestController implements ApplicationEventPublisherAware {
private ApplicationEventPublisher publisher;
@Resource
private WechatMessageService wechatMessageService;
@Resource
private NewpartnerService newpartnerService;
@Resource
private AliforexcelService aliforexcelService;
@ManagerMapping(value = "/{clientMoniker}/export/agreepdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.DIRECTOR, ManagerRole.OPERATOR})
public void exportAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, HttpServletResponse httpResponse) throws Exception {
@ -380,4 +378,15 @@ public class TestController implements ApplicationEventPublisherAware {
wechatMessageService.sendMessageByOpenId(sendWechatMessage);
}
/* @ManagerMapping(value = "/orgusertest", method = RequestMethod.POST, role = {ManagerRole.ADMIN,ManagerRole.DEVELOPER})
public JSONObject orgusertest(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @RequestBody @Valid ClientTestRegisterInfo registery,
Errors errors) {
HttpUtils.handleValidErrors(errors);
return newpartnerService.registerClient(null, registery, manager);
}*/
@ManagerMapping(value = "/aliforexcel", method = RequestMethod.GET, role = ManagerRole.DEVELOPER)
public void aliforexcel(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, HttpServletResponse httpResponse, AliExcel query) throws Exception {
aliforexcelService.listClients(httpResponse,manager,query);
}
}

@ -34,6 +34,8 @@ public interface ClientMapper {
PageList<JSONObject> listPartners(JSONObject params, PageBounds pagination);
List<JSONObject> passPartners(JSONObject params);
List<JSONObject> listClients();
List<JSONObject> listPartnerSelection(JSONObject params, PageBounds pagination);

@ -166,6 +166,20 @@
<if test="is_valid">and c.is_valid=1</if>
</where>
</select>
<select id="passPartners" resultType="com.alibaba.fastjson.JSONObject">
SELECT
company_name,short_name,client_moniker,alipayindustry,address,suburb,state,postcode,business_hours,company_phone,description
from sys_clients
<where>
(approve_result=1 or (approve_result=2 and (source=1 or source=2)))
<if test="datefrom!=null">
AND approve_time >= #{datefrom}
</if>
<if test="dateto!=null">
AND approve_time &lt;= #{dateto}
</if>
</where>
</select>
<select id="listPartnerSelection" resultType="com.alibaba.fastjson.JSONObject">
SELECT c.*,o.name org_name FROM sys_clients c
inner join sys_org o on o.org_id=c.org_id

Loading…
Cancel
Save