Merge branch 'devtools' into develop

master
luoyang14z7 6 years ago
commit 1ecbc4894f

@ -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

@ -51,6 +51,14 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
url: '/phone_top_up',
templateUrl: '/static/config/devtools/templates/phone_top_up.html',
controller: 'phonetopupCtrl'
}).state('devtools.orgusertest', {
url: '/orgusertest',
templateUrl: '/static/config/devtools/templates/orgusertest.html',
controller: 'orgusertestCtrl'
}).state('devtools.aliforexcel', {
url: '/aliforexcel',
templateUrl: '/static/config/devtools/templates/aliforexcel.html',
controller: 'aliforexcelCtrl'
})
}]);
app.controller('devManualRefundCtrl', ['$scope', '$http', 'commonDialog', function ($scope, $http, commonDialog) {
@ -302,6 +310,37 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
})
}
}]);
app.controller('orgusertestCtrl', ['$scope', '$http', '$filter','commonDialog', function ($scope, $http, $filter,commonDialog) {
$scope.regist = function () {
$http.post('/dev/orgusertest',{client_moniker: $scope.company}).then(function (resp) {
commonDialog.alert({title: 'SUCCESS', content:"注册成功", type: 'success'})
}, function (resp) {
commonDialog.alert({title: 'Error', content: "商品编号已存在", type: 'Error'})
})
}
}]);
app.controller('aliforexcelCtrl', ['$scope', '$filter', function ($scope, $filter) {
$scope.params = {};
var str = $filter('date')(new Date(), 'yyyyMMdd');
var oDate = new Date(str.slice(0, 4), str.slice(4, 6) - 1, str.slice(-2));
var oDay = oDate.getDay();
var oNum = oDate.getDate();
var bWeek1 =new Date(str.slice(0, 4), str.slice(4, 6) - 1, oNum-oDay-6);
var bWeek2 =new Date(str.slice(0, 4), str.slice(4, 6) - 1, oNum-oDay);
$scope.params.datefrom = bWeek1;
$scope.params.dateto = bWeek2;
$scope.Export = function () {
var params = angular.copy($scope.params);
params.datefrom = $filter('date')(params.datefrom, 'yyyy-MM-dd');
params.dateto = $filter('date')(params.dateto, 'yyyy-MM-dd');
var url = '/dev/aliforexcel';
var connectSymbol = '?';
url += connectSymbol + 'datefrom=' + params.datefrom + '&' + 'dateto=' + params.dateto;
return url;
}
}]);
return app;

@ -21,7 +21,7 @@
<input ng-model="company" name="code" class="form-control" type="text"/>
</div>
<div class="form-group">
<button class="btn btn-primary btn-block" ng-click="test()">commit</button>
<button class="btn btn-primary btn-block" ng-click="regist()">commit</button>
</div>
</form>
</div>

@ -67,6 +67,14 @@
<i class="fa fa-envelope"></i>
Phone Top Up
</a>
<a class="btn btn-app" role="button" ui-sref=".orgusertest">
<i class="fa fa-envelope"></i>
Partner test
</a>
<a class="btn btn-app" role="button" ui-sref=".aliforexcel">
<i class="fa fa-envelope"></i>
支付宝进件导出
</a>
</div>
</div>
</section>

Loading…
Cancel
Save