import javax.persistence.LockModeType;
import javax.persistence.QueryHint;
-public interface AccountDao extends JpaRepository<TAccount, String>, TAccountRepository {
+public interface AccountDao extends JpaRepository<TAccount, String> {
@Lock(LockModeType.PESSIMISTIC_WRITE)
@Query("select a from TAccount a where a.accno = ?1")
@Column(name = "reverse_flag", nullable = false, length = 10)
private String reverseFlag = "none";
- @OneToOne(targetEntity = TPersondtl.class, mappedBy = "refno", fetch = LAZY)
+ @OneToOne(targetEntity = TPersondtl.class, fetch = LAZY)
+ @JoinColumn(name = "refno", referencedColumnName = "refno")
private TPersondtl personDtl;
- @OneToOne(targetEntity = TShopdtl.class, mappedBy = "refno", fetch = LAZY)
+ @OneToOne(targetEntity = TShopdtl.class, fetch = LAZY)
+ @JoinColumn(name = "refno", referencedColumnName = "refno")
private TShopdtl shopDtl;
- @OneToOne(targetEntity = TSubjectdtl.class, mappedBy = "refno", fetch = LAZY)
+ @OneToOne(targetEntity = TSubjectdtl.class, fetch = LAZY)
+ @JoinColumn(name = "refno", referencedColumnName = "refno")
private TSubjectdtl subjectDtl;
@OneToMany(targetEntity = TDebitCreditDtl.class, mappedBy = "refno", fetch = LAZY)
void updateShopnameByShopaccno(String shopname, String shopaccno);
- TShopacc findByShopacc(String acc);
+ TShopacc findByShopaccno(String acc);
}
template.setConnectionFactory(connectionFactory)
return template
}
-
- @Bean
- fun longValueRedisTemplate(connectionFactory: RedisConnectionFactory): RedisTemplate<String, Long> {
- val template = RedisTemplate<String, Long>()
- template.keySerializer = StringRedisSerializer()
- return template
- }
}
--- /dev/null
+package com.supwisdom.dlpay.api
+
+import org.aspectj.lang.JoinPoint
+import org.aspectj.lang.annotation.Aspect
+import org.aspectj.lang.annotation.Before
+import org.aspectj.lang.annotation.Pointcut
+import org.springframework.stereotype.Component
+
+@Component
+@Aspect
+class RestControllerAspect {
+
+ @Pointcut("execution( * com.supwisdom.dlpay.api..*(..))")
+ private fun beforeRequest() {
+ }
+
+ @Before("beforeRequest()")
+ fun check(point: JoinPoint) {
+ point.args.forEach {
+ println("request : $it")
+ }
+ }
+}
}
override fun readShopbyAccno(shopacc: String): TShopacc {
- return shopaccDao.findByShopacc(shopacc)
+ return shopaccDao.findByShopaccno(shopacc)
?: throw TransactionProcessException(TradeErrorCode.SHOP_NOT_EXISTS, "商户<$shopacc>不存在")
}