Index: branches/grails3_dealer-service/src/integration-test/groovy/com/lemans/rider/MonthlyReportFunctionalSpec.groovy =================================================================== diff -u -r9468 -r9533 --- branches/grails3_dealer-service/src/integration-test/groovy/com/lemans/rider/MonthlyReportFunctionalSpec.groovy (.../MonthlyReportFunctionalSpec.groovy) (revision 9468) +++ branches/grails3_dealer-service/src/integration-test/groovy/com/lemans/rider/MonthlyReportFunctionalSpec.groovy (.../MonthlyReportFunctionalSpec.groovy) (revision 9533) @@ -3,8 +3,6 @@ import com.lemans.testing.DealerApiFunctionalSpec import spock.lang.Shared -//@Stepwise -@SuppressWarnings(['MethodCount']) class MonthlyReportFunctionalSpec extends DealerApiFunctionalSpec { String resourceName() { '' } Index: branches/grails3_dealer-service/src/integration-test/groovy/com/lemans/paytrace/PayTraceCallBackFunctionalSpec.groovy =================================================================== diff -u -r9529 -r9533 --- branches/grails3_dealer-service/src/integration-test/groovy/com/lemans/paytrace/PayTraceCallBackFunctionalSpec.groovy (.../PayTraceCallBackFunctionalSpec.groovy) (revision 9529) +++ branches/grails3_dealer-service/src/integration-test/groovy/com/lemans/paytrace/PayTraceCallBackFunctionalSpec.groovy (.../PayTraceCallBackFunctionalSpec.groovy) (revision 9533) @@ -26,13 +26,14 @@ } } - @SuppressWarnings(['LineLength']) def 'can handle paytraceCustomerProfile callback'() { given: securityParams.loggedInDealerCode = '13233' securityParams.loggedInUserName = 'TOXINZ' queryParams.parmList = - 'ORDERID~13233_1FBADF6CDD2B|TRANSACTIONID~128085274|APPCODE~TAS952|APPMSG~ NO MATCH - Approved and completed|AVSRESPONSE~No Match|CSCRESPONSE~Match|EMAIL~dfsg@gmail.com|BNAME~sdf|CARDTYPE~Visa|EXPMNTH~02|EXPYR~21|LAST4~2222|AMOUNT~1.00|' + 'ORDERID~13233_1FBADF6CDD2B|TRANSACTIONID~128085274|APPCODE~TAS952|APPMSG~ NO MATCH - Approved and' + + ' completed|AVSRESPONSE~No Match|CSCRESPONSE~Match|' + + 'EMAIL~dfsg@gmail.com|BNAME~sdf|CARDTYPE~Visa|EXPMNTH~02|EXPYR~21|LAST4~2222|AMOUNT~1.00|' path() ok() Index: branches/grails3_dealer-service/src/integration-test/groovy/com/lemans/salesman/SalesmanWeeklyRecapIntegrationSpec.groovy =================================================================== diff -u -r9529 -r9533 --- branches/grails3_dealer-service/src/integration-test/groovy/com/lemans/salesman/SalesmanWeeklyRecapIntegrationSpec.groovy (.../SalesmanWeeklyRecapIntegrationSpec.groovy) (revision 9529) +++ branches/grails3_dealer-service/src/integration-test/groovy/com/lemans/salesman/SalesmanWeeklyRecapIntegrationSpec.groovy (.../SalesmanWeeklyRecapIntegrationSpec.groovy) (revision 9533) @@ -9,9 +9,6 @@ import java.time.Year import java.time.format.DateTimeFormatter -/** - * Created by vramisetti on 8/2/2016. - */ @SuppressWarnings(['MethodCount']) @Integration(applicationClass = Application) @Rollback Index: branches/grails3_dealer-service/src/integration-test/groovy/com/lemans/rider/MonthlyReportServiceIntegrationSpec.groovy =================================================================== diff -u -r9529 -r9533 --- branches/grails3_dealer-service/src/integration-test/groovy/com/lemans/rider/MonthlyReportServiceIntegrationSpec.groovy (.../MonthlyReportServiceIntegrationSpec.groovy) (revision 9529) +++ branches/grails3_dealer-service/src/integration-test/groovy/com/lemans/rider/MonthlyReportServiceIntegrationSpec.groovy (.../MonthlyReportServiceIntegrationSpec.groovy) (revision 9533) @@ -477,7 +477,6 @@ clause == 'MONTH(raceMonth) = 1 AND YEAR(raceMonth) = 2015' } - @SuppressWarnings('LineLength') def 'can send monthly Report email'() { given: String dealerCode = 'TEST99' Index: branches/grails3_dealer-service/grails-app/conf/application.yml =================================================================== diff -u -r9407 -r9533 --- branches/grails3_dealer-service/grails-app/conf/application.yml (.../application.yml) (revision 9407) +++ branches/grails3_dealer-service/grails-app/conf/application.yml (.../application.yml) (revision 9533) @@ -2,19 +2,23 @@ grails: profile: rest-api codegen: - defaultPackage: grails3_dealer.service + defaultPackage: com.lemans.dealer spring: transactionManagement: - proxies: false + proxies: false info: app: name: '@info.app.name@' version: '@info.app.version@' grailsVersion: '@info.app.grailsVersion@' spring: + main: + banner-mode: "off" groovy: template: check-template-location: false + jmx: + default-domain: dealer-service # Spring Actuator Endpoints are Disabled by Default endpoints: @@ -34,35 +38,35 @@ - Presto - Trident types: - all: '*/*' - atom: application/atom+xml - css: text/css - csv: text/csv - form: application/x-www-form-urlencoded - html: - - text/html - - application/xhtml+xml - js: text/javascript json: - application/json - text/json - multipartForm: multipart/form-data - pdf: application/pdf - rss: application/rss+xml - text: text/plain hal: - application/hal+json - application/hal+xml xml: - text/xml - application/xml + atom: application/atom+xml + css: text/css + csv: text/csv + js: text/javascript + rss: application/rss+xml + text: text/plain + all: '*/*' urlmapping: cache: maxsize: 1000 controllers: defaultScope: singleton converters: encoding: UTF-8 + databinding: + dateFormats: + - yyyy-MM-dd'T'hh:mm:ss + - yyyy-MM-dd + - MM/dd/yyyy HH:mm:ss + - MM/dd/yyyy --- hibernate: @@ -141,9 +145,10 @@ jndiName: java:comp/env/jdbc/sqlcDatasource logSql: false - +--- +--- server: - context-path: /dealer-service + contextPath: /dealer-service management: - context-path: /admin + context_path: /admin Index: branches/grails3_dealer-service/grails-app/controllers/com/lemans/sales/goals/PartReportController.groovy =================================================================== diff -u -r9528 -r9533 --- branches/grails3_dealer-service/grails-app/controllers/com/lemans/sales/goals/PartReportController.groovy (.../PartReportController.groovy) (revision 9528) +++ branches/grails3_dealer-service/grails-app/controllers/com/lemans/sales/goals/PartReportController.groovy (.../PartReportController.groovy) (revision 9533) @@ -7,10 +7,12 @@ class PartReportController extends LemansApiController implements LemansLegacyPackager { def salesGoalService - + def index() { Map criteria = common() + filters(['salesGoal']) Map data = salesGoalService.findPartReportBySalesGoal(criteria) render toJson(legacyPackage(data)) } } + + Index: branches/grails3_dealer-service/grails-app/conf/application.groovy =================================================================== diff -u -r9370 -r9533 --- branches/grails3_dealer-service/grails-app/conf/application.groovy (.../application.groovy) (revision 9370) +++ branches/grails3_dealer-service/grails-app/conf/application.groovy (.../application.groovy) (revision 9533) @@ -1 +1,2 @@ -grails.databinding.dateFormats = ["yyyy-MM-dd'T'hh:mm:ss", 'yyyy-MM-dd'] \ No newline at end of file +grails.databinding.dateFormats = ["yyyy-MM-dd'T'hh:mm:ss", 'yyyy-MM-dd'] + Index: branches/grails3_dealer-service/build.gradle =================================================================== diff -u -r9406 -r9533 --- branches/grails3_dealer-service/build.gradle (.../build.gradle) (revision 9406) +++ branches/grails3_dealer-service/build.gradle (.../build.gradle) (revision 9533) @@ -27,7 +27,7 @@ //Le Mans apply plugin: 'net.saliman.cobertura' -//apply plugin: 'codenarc' +apply plugin: 'codenarc' repositories { mavenLocal() @@ -74,6 +74,7 @@ profile "org.grails.profiles:rest-api" compile 'lemans:xml-json:0.11' + provided 'net.sourceforge.jtds:jtds:1.3.1' compile 'org.apache.poi:poi:3.14' compile 'org.apache.poi:poi-ooxml:3.14' @@ -100,7 +101,6 @@ compile 'org.apache.httpcomponents:httpclient:4.2.1' compile 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.2' compile 'org.threeten:threetenbp:1.1' - compile 'dumbster:dumbster:1.6' compile 'com.lemans.grails.plugins:lemans-core:0.1.4' compile 'com.lemans.grails.plugins:lemans-security:0.1.2c' @@ -109,6 +109,7 @@ } + //Extra Lemans Config Section: grails { @@ -127,10 +128,10 @@ systemProperties System.properties } -/*codenarc { +codenarc { toolVersion = '1.0' configFile = file("${project.projectDir}/codenarc/rules.groovy") -}*/ +} cobertura { coverageExcludes = ['.*Application.*'] Index: branches/grails3_dealer-service/grails-app/controllers/com/lemans/dealer/ImprovedDealerController.groovy =================================================================== diff -u -r9530 -r9533 --- branches/grails3_dealer-service/grails-app/controllers/com/lemans/dealer/ImprovedDealerController.groovy (.../ImprovedDealerController.groovy) (revision 9530) +++ branches/grails3_dealer-service/grails-app/controllers/com/lemans/dealer/ImprovedDealerController.groovy (.../ImprovedDealerController.groovy) (revision 9533) @@ -3,7 +3,7 @@ import com.lemans.LemansApiController import com.lemans.LemansLegacyPackager -class ImprovedDealerController extends AbstractDealerCheckingController { +class ImprovedDealerController extends LemansApiController implements LemansLegacyPackager { def dealerService @@ -17,4 +17,13 @@ Map data = dealerService.findDealer(criteria) render toJson(legacyPackage(data)) } + + private List checkDealer(String dealerCode) { + if (dealerCode) { + boolean dealerExists = dealerService.dealerExists(dealerCode) + if (!dealerExists) { + [[field: 'dealerCode', message: "Dealer $dealerCode cannot be found", code: 'WM-200']] + } + } + } } Index: branches/grails3_dealer-service/grails-app/controllers/com/lemans/dealer/activities/DealerActivityReportingController.groovy =================================================================== diff -u -r9530 -r9533 --- branches/grails3_dealer-service/grails-app/controllers/com/lemans/dealer/activities/DealerActivityReportingController.groovy (.../DealerActivityReportingController.groovy) (revision 9530) +++ branches/grails3_dealer-service/grails-app/controllers/com/lemans/dealer/activities/DealerActivityReportingController.groovy (.../DealerActivityReportingController.groovy) (revision 9533) @@ -2,16 +2,13 @@ import com.lemans.LemansApiController import com.lemans.LemansLegacyPackager -import com.lemans.dealer.AbstractDealerCheckingController import grails.converters.JSON import org.json.JSONObject - - import java.text.DateFormat import java.text.ParseException import java.text.SimpleDateFormat -class DealerActivityReportingController extends AbstractDealerCheckingController { +class DealerActivityReportingController extends LemansApiController implements LemansLegacyPackager { static final String ACTIVITY_LOG_DATE_FORMAT = 'MM/dd/yyyy' @@ -168,4 +165,13 @@ private String message(String code) { messageSource.getMessage(code, [] as Object[], Locale.default) } + + private List checkDealer(String dealerCode) { + if (dealerCode) { + boolean dealerExists = dealerService.dealerExists(dealerCode) + if (!dealerExists) { + [[field: 'dealerCode', message: "Dealer $dealerCode cannot be found", code: 'WM-200']] + } + } + } } Index: branches/grails3_dealer-service/grails-app/init/com/lemans/Application.groovy =================================================================== diff -u -r9352 -r9533 --- branches/grails3_dealer-service/grails-app/init/com/lemans/Application.groovy (.../Application.groovy) (revision 9352) +++ branches/grails3_dealer-service/grails-app/init/com/lemans/Application.groovy (.../Application.groovy) (revision 9533) @@ -7,4 +7,4 @@ static void main(String[] args) { GrailsApp.run(Application, args) } -} \ No newline at end of file +}