|
|
@@ -5,6 +5,7 @@ import com.style24.batch.biz.job.TsbAbstractJob;
|
|
|
import com.style24.batch.biz.service.TsbCustomerService;
|
|
|
import com.style24.batch.support.env.TsbConstants;
|
|
|
import com.style24.core.support.env.TscConstants;
|
|
|
+import com.style24.persistence.domain.CustCoupon;
|
|
|
import com.style24.persistence.domain.Customer;
|
|
|
import com.style24.persistence.domain.CustomerSearch;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@@ -21,7 +22,7 @@ import java.util.Collection;
|
|
|
*/
|
|
|
@Component
|
|
|
@Slf4j
|
|
|
-public class TsbBirthdayCouponNoticeJob extends TsbAbstractJob<Collection<Customer>, GagaMap, GagaMap> {
|
|
|
+public class TsbBirthdayCouponNoticeJob extends TsbAbstractJob<Collection<CustCoupon>, GagaMap, GagaMap> {
|
|
|
|
|
|
@Autowired
|
|
|
TsbCustomerService customerService;
|
|
|
@@ -30,20 +31,20 @@ public class TsbBirthdayCouponNoticeJob extends TsbAbstractJob<Collection<Custom
|
|
|
private int failCnt = 0;
|
|
|
|
|
|
@Override
|
|
|
- public Collection<Customer> read() throws Exception {
|
|
|
+ public Collection<CustCoupon> read() throws Exception {
|
|
|
CustomerSearch customerSearch = new CustomerSearch();
|
|
|
customerSearch.setSiteCd(TscConstants.Site.STYLE24.value());
|
|
|
return customerService.getBirthDayTargetList(customerSearch);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public GagaMap process(Collection<Customer> readItem) throws Exception {
|
|
|
+ public GagaMap process(Collection<CustCoupon> readItem) throws Exception {
|
|
|
|
|
|
- for (Customer customer: readItem) {
|
|
|
+ for (CustCoupon CustCoupon: readItem) {
|
|
|
try {
|
|
|
- customer.setRegNo(TsbConstants.REG_NO);
|
|
|
- customer.setUpdNo(TsbConstants.REG_NO);
|
|
|
- customerService.sendBirthDayCouponNotice(customer);
|
|
|
+ CustCoupon.setRegNo(TsbConstants.REG_NO);
|
|
|
+ CustCoupon.setUpdNo(TsbConstants.REG_NO);
|
|
|
+ customerService.sendBirthDayCouponNotice(CustCoupon);
|
|
|
succCnt++;
|
|
|
} catch (Exception e) {
|
|
|
failCnt++;
|