|
|
|
@ -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"));
|
|
|
|
|