Merge branch 'brancah' into develop

master
yuan 7 years ago
commit 314b56cfbf

@ -947,7 +947,14 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
return JSON.parseObject(reportItem.getString("result"));
}
}
return paymentApi.validTransactions(dt, fix);
JSONObject report = paymentApi.validTransactions(dt, fix);
JSONObject log = new JSONObject();
log.put("valid_date", dt);
log.put("create_time", new Date());
log.put("result", report.toJSONString());
validationLogMapper.removeByDate(dt);
validationLogMapper.save(log);
return report;
}
private byte[] getZipByteArr(List<JSONObject> fileByteArrWithName) throws IOException {

@ -1240,8 +1240,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private void checkModifyRate(JSONObject org,JSONObject configJson,String rateName,String rateValueKey){
if(configJson.getString("rate_name").equals(rateName)){
if(org.containsKey(rateValueKey)){
if(configJson.getDouble("rate_value").compareTo(org.getDouble(rateValueKey)) > 0){
throw new ForbiddenException("费率参数于旗下商户最低"+rateName+"费率,请重新输入===>");
if(configJson.getDouble("rate_value").compareTo(org.getDouble(rateValueKey)) < 0){
throw new ForbiddenException("费率参数于旗下商户最低"+rateName+"费率,请重新输入");
};
}
}
@ -1249,8 +1249,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private void checkAddRate(JSONObject config,String channel, String rateKey,JSONObject org,String rateValueKey){
if(config.containsKey(rateKey)){
if(org.containsKey(rateValueKey)){
if(config.getBigDecimal(rateKey).compareTo(org.getBigDecimal(rateValueKey)) > 0){
throw new ForbiddenException("费率参数于旗下商户最低"+channel+"费率,请重新输入===>");
if(config.getBigDecimal(rateKey).compareTo(org.getBigDecimal(rateValueKey)) < 0){
throw new ForbiddenException("费率参数于旗下商户最低"+channel+"费率,请重新输入");
};
}
}

@ -148,12 +148,12 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
private void validLoginInfo(LoginInfo loginInfo, JSONObject account) {
if (account == null) {
throw new BadRequestException(LocaleSupport.localeMessage("login.error.password"));
throw new BadRequestException(LocaleSupport.localeMessage("error.login.password"));
}
String salt = account.getString("salt");
String pwdHash = loginInfo.getPasswordHashed(salt);
if (!StringUtils.equals(pwdHash, account.getString("password_hash"))) {
throw new BadRequestException(LocaleSupport.localeMessage("login.error.password"));
throw new BadRequestException(LocaleSupport.localeMessage("error.login.password"));
}
}

@ -0,0 +1,31 @@
package au.com.royalpay.payment.manage.task;
import au.com.royalpay.payment.manage.analysis.core.WeekReporter;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.Date;
import javax.annotation.Resource;
/**
* Created by wangning on 24/01/2018.
*/
@Component
@ConditionalOnProperty(value = "app.run-tasks", havingValue = "true")
public class WeekReportGenerationTask {
@Resource
private WeekReporter weekReporter;
@Scheduled(cron = "0 0 2 * * 1")
public void autoGenerateReport() {
Date lastweek = new Date();
lastweek = DateUtils.addDays(lastweek, -7);
weekReporter.generateReport(DateFormatUtils.format(lastweek, "yyyy-MM-dd"), true);
}
}

@ -54,7 +54,7 @@
<![CDATA[
SELECT DISTINCT scr.kanga_openid FROM sys_customer_relation scr, sys_managers sm
WHERE scr.wechat_openid = sm.wx_openid AND scr.kanga_openid IS NOT NULL
AND sm.role & 10000001 > 0
AND sm.role & 10000001 > 0 and sm.is_valid=1
]]>
</select>
</mapper>

@ -185,11 +185,11 @@
<div class="weui-cell__hd" th:text="${bd.sort}"></div>
<div class="weui-cell__bd weui-cell_primary"
th:text="${bd.bd_name}">
<span style="color: green"
th:if="${bd.compare and $bd.compare.direction>0}"
th:text="'↑('+${bd.compare.value}+')'"></span>
<span style="color: green"
th:if="${bd.compare and bd.compare.direction>0}"
th:text="'↑('+${bd.compare.value}+')'"></span>
<span style="color: red"
th:if="${bd.compare and $bd.compare.direction>0}"
th:if="${bd.compare and bd.compare.direction>0}"
th:text="'↓('+${bd.compare.value}+')'"></span>
</div>
<div class="weui-cell__ft" th:text="${bd.total}"></div>

@ -32,12 +32,12 @@
<div class="weui-cell__ft" th:text="${partner.amount}"></div>
</div>
<div th:if="${partner.compare}!=null">
<div th:if="${partner['compare']}!=null">
<div class="weui-cell">
<div class="weui-cell__bd weui-cell_primary">较上周比较</div>
<div class="weui-cell__ft">
<span th:if="${partner.compare.direction>0}" th:text="'↑'+${$partner.compare.value}" style="color: green"></span>
<span th:if="${partner.compare.direction<0}" th:text="'↓'+${$partner.compare.value}" style="color: red" ></span>
<span th:if="${partner.compare.direction>0}" th:text="'↑'+${partner.compare.value}" style="color: green"></span>
<span th:if="${partner.compare.direction<0}" th:text="'↓'+${partner.compare.value}" style="color: red" ></span>
<span th:if="${partner.compare.direction==0}" th:text="${partner.compare.value}"></span>
</div>
</div>

Loading…
Cancel
Save