diff --git a/pom.xml b/pom.xml
index 0ad4332e7..809d69664 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,7 +9,7 @@
4.0.0
manage
- 1.3.6
+ 1.3.7
UTF-8
1.4.0
diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientIncrementalMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientIncrementalMapper.java
index 1e70b0185..878ecfe6d 100644
--- a/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientIncrementalMapper.java
+++ b/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientIncrementalMapper.java
@@ -5,7 +5,6 @@ import cn.yixblog.support.mybatis.autosql.annotations.AutoSql;
import cn.yixblog.support.mybatis.autosql.annotations.SqlType;
import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Param;
-import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.executor.keygen.Jdbc3KeyGenerator;
import java.util.List;
@@ -34,13 +33,9 @@ public interface ClientIncrementalMapper {
@AutoSql(type = SqlType.UPDATE)
void update(JSONObject saveIncrementalService);
- @Select("SELECT incremental_rate_value FROM sys_client_incremental WHERE channel = #{channel} AND client_id = #{client_id} ")
+ @AutoSql(type = SqlType.SELECT)
String findByChannelAndClientId(@Param("client_id") int clientId,@Param("channel") String channel);
@AutoSql(type = SqlType.SELECT)
List find(@Param("client_id") int clientId);
-
- @AutoSql(type = SqlType.SELECT)
- JSONObject findBySourceCodeAndClientId(@Param("client_id") int clientId, @Param("source_code") String sourceCode);
-
}
diff --git a/src/main/java/au/com/royalpay/payment/manage/rservices/core/impl/RServicesApplyServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/rservices/core/impl/RServicesApplyServiceImpl.java
index ae5c52abd..2f257d8d3 100644
--- a/src/main/java/au/com/royalpay/payment/manage/rservices/core/impl/RServicesApplyServiceImpl.java
+++ b/src/main/java/au/com/royalpay/payment/manage/rservices/core/impl/RServicesApplyServiceImpl.java
@@ -86,13 +86,13 @@ public class RServicesApplyServiceImpl implements RServicesApplyService {
applyInfo.put("operator_time", new Date());
applyInfo.put("status", 1);
clientServicesApplyMapper.update(applyInfo);
- JSONObject clientServices = clientIncrementalMapper.findBySourceCodeAndClientId(applyInfo.getIntValue("client_id"), applyInfo.getString("service_code"));
JSONObject increment = commonIncrementalChannelMapper.findIncreamentalChannelBySourceCode(applyInfo.getString("service_code"));
+ JSONObject clientServices = clientIncrementalMapper.findByClinetIdAndChannel(applyInfo.getIntValue("client_id"), increment.getString("channel"));
if (clientServices == null) {
clientServices = new JSONObject();
clientServices.put("incremental_id", UUID.randomUUID().toString());
clientServices.put("client_id", applyInfo.getIntValue("client_id"));
- clientServices.put("channel", increment.getIntValue("channel"));
+ clientServices.put("channel", increment.getString("channel"));
clientServices.put("incremental_mode", 2);
clientServices.put("incremental_rate_value", 0);
clientServices.put("total_incremental_amount", applyInfo.getBigDecimal("amount"));