D
Size: a a a
А
DC
А
AS
SS
AS
А
V
@Override
@Modifying
@Transactional
public void delete(String mcc, Long clientCopyId) {
RoutingSmsRuleControl routingSmsRuleControl = routingSmsRuleControlService.getByMccAndAccount(mcc, clientCopyId);
if (routingSmsRuleControl != null) routingSmsRuleControlRepository.delete(routingSmsRuleControl);
}
AG
V
@Entity
@Table(name = "routing_sms_rules_control",
uniqueConstraints = {@UniqueConstraint(columnNames = {"mcc", "account"})},
indexes = {
@Index(columnList = "mcc", name = "routing_control_mcc_idx"),
@Index(columnList = "account", name = "routing_control_account_idx"),
@Index(columnList = "rate_control", name = "routing_control_rate_idx"),
@Index(columnList = "profit_control", name = "routing_control_profit_idx")
})
public class RoutingSmsRuleControl {
@Id
@GeneratedValue
@Column(name = "id")
private Long id;
@Column(name = "mcc", length = 3)
private String mcc;
@Column(name = "account")
private Long account;
@Column(name = "rate_control")
private Boolean rateControl = false;
@Column(name = "negative_rate_found")
private Boolean negativeRateFound = false;
@Column(name = "vendor_negative_rate")
private Long vendorNegativeRate;
@Column(name = "profit_control")
private Boolean profitControl = false;
@Column(name = "negative_profit")
private Float negativeProfit;
@Column(name = "blocked_by_profit_control")
private Boolean blockedByProfitControl = false;
@Column(name = "vendor_negative_profit")
private Long vendorNegativeProfit;
@Column(name = "countdown_time")
private Date countdownTime;
public RoutingSmsRuleControl() {
}
}
AE
AE
@Modifying
предназначена для методов репозитория с аннотацией @Query
, которая содержит insert/delete. На сервисе она не нужнаOM