mirror of https://github.com/jeecgboot/jeecg-boot
commit
382eb3e65d
|
@ -16,10 +16,7 @@ import org.jeecg.modules.business.entity.ShippingDiscount;
|
|||
import org.jeecg.modules.business.entity.Sku;
|
||||
import org.jeecg.modules.business.entity.SkuDeclaredValue;
|
||||
import org.jeecg.modules.business.entity.SkuPrice;
|
||||
import org.jeecg.modules.business.service.IShippingDiscountService;
|
||||
import org.jeecg.modules.business.service.ISkuDeclaredValueService;
|
||||
import org.jeecg.modules.business.service.ISkuPriceService;
|
||||
import org.jeecg.modules.business.service.ISkuService;
|
||||
import org.jeecg.modules.business.service.*;
|
||||
import org.jeecg.modules.business.vo.SkuName;
|
||||
import org.jeecg.modules.business.vo.SkuPage;
|
||||
import org.jeecg.modules.business.vo.SkuUpdate;
|
||||
|
@ -350,4 +347,12 @@ public class SkuController {
|
|||
);
|
||||
}
|
||||
|
||||
@GetMapping("/skusByClient")
|
||||
public Result<?> skusByClient(@RequestParam String clientId) {
|
||||
List<Sku> skus = skuService.fetchSkusByClient(clientId);
|
||||
IPage<Sku> page = new Page<>();
|
||||
page.setRecords(skus);
|
||||
page.setTotal(skus.size());
|
||||
return Result.OK(page);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -792,6 +792,7 @@ public class InvoiceController {
|
|||
metaDataErrorList.add(metaData);
|
||||
}
|
||||
else {
|
||||
filenameList.add(INVOICE_PDF_DIR + "//" + "Invoice N°" + metaData.getInvoiceCode() + " (" + metaData.getInvoiceEntity() + ").pdf");
|
||||
filenameList.add(INVOICE_DIR + "//" + metaData.getFilename());
|
||||
List<FactureDetail> factureDetails = shippingInvoiceService.getInvoiceDetail(metaData.getInvoiceCode());
|
||||
List<SavRefundWithDetail> refunds = savRefundWithDetailService.getRefundsByInvoiceNumber(metaData.getInvoiceCode());
|
||||
|
|
|
@ -182,7 +182,7 @@ public class MabangSkuJob implements Job {
|
|||
param.put("total_page", String.valueOf(messageContentList.size()));
|
||||
TemplateMessageDTO message = new TemplateMessageDTO("admin", "admin", "SKU导入任务", param, "sku_mabang_job_result");
|
||||
ISysBaseApi.sendTemplateAnnouncement(message);
|
||||
message = new TemplateMessageDTO("admin", "Alice", "SKU导入任务", param, "sku_mabang_job_result");
|
||||
// message = new TemplateMessageDTO("admin", "Alice", "SKU导入任务", param, "sku_mabang_job_result");
|
||||
ISysBaseApi.sendTemplateAnnouncement(message);
|
||||
message = new TemplateMessageDTO("admin", "Jessyca", "SKU导入任务", param, "sku_mabang_job_result");
|
||||
ISysBaseApi.sendTemplateAnnouncement(message);
|
||||
|
|
|
@ -0,0 +1,79 @@
|
|||
package org.jeecg.modules.business.domain.job;
|
||||
|
||||
import freemarker.template.Template;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.modules.business.entity.ClientSku;
|
||||
import org.jeecg.modules.business.entity.Sku;
|
||||
import org.jeecg.modules.business.service.*;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.ui.freemarker.FreeMarkerTemplateUtils;
|
||||
import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer;
|
||||
|
||||
import javax.mail.Authenticator;
|
||||
import javax.mail.PasswordAuthentication;
|
||||
import javax.mail.Session;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* A Job that retrieves all Sku from Mabang
|
||||
* if the sku is of status 3 (normal) and not in DB, then we insert it in DB
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class SkuAssociationToClientJob implements Job {
|
||||
|
||||
@Autowired
|
||||
private ISkuService skuService;
|
||||
@Autowired
|
||||
private IClientSkuService clientSkuService;
|
||||
@Autowired
|
||||
private EmailService emailService;
|
||||
@Autowired
|
||||
private FreeMarkerConfigurer freemarkerConfigurer;
|
||||
@Autowired
|
||||
Environment env;
|
||||
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext context) throws JobExecutionException {
|
||||
log.info("SkuAssociationToClientJob start");
|
||||
List<String> allSkusIds = skuService.list().stream().map(Sku::getId).collect(Collectors.toList());
|
||||
List<String> allClientSkuIds = clientSkuService.list().stream().map(ClientSku::getSkuId).collect(Collectors.toList());
|
||||
List<String> newSkusIds = allSkusIds.stream().filter(skuId -> !allClientSkuIds.contains(skuId)).collect(Collectors.toList());
|
||||
List<Sku> newSkus = skuService.listByIds(newSkusIds);
|
||||
List<String> unknownClientSkus = clientSkuService.saveClientSku(newSkus);
|
||||
|
||||
// send email for manual check
|
||||
if(!unknownClientSkus.isEmpty()) {
|
||||
log.info("Sending email for manual check.");
|
||||
Properties prop = emailService.getMailSender();
|
||||
Session session = Session.getInstance(prop, new Authenticator() {
|
||||
@Override
|
||||
protected PasswordAuthentication getPasswordAuthentication() {
|
||||
return new PasswordAuthentication(env.getProperty("spring.mail.username"), env.getProperty("spring.mail.password"));
|
||||
}
|
||||
});
|
||||
|
||||
String subject = "Association of Sku to Client failed";
|
||||
String destEmail = env.getProperty("spring.mail.username");
|
||||
Map<String, Object> templateModel = new HashMap<>();
|
||||
templateModel.put("skus", unknownClientSkus);
|
||||
try {
|
||||
freemarkerConfigurer = emailService.freemarkerClassLoaderConfig();
|
||||
Template template = freemarkerConfigurer.getConfiguration().getTemplate("admin/unknownClientForSku.ftl");
|
||||
String htmlBody = FreeMarkerTemplateUtils.processTemplateIntoString(template, templateModel);
|
||||
emailService.sendSimpleMessage(destEmail, subject, htmlBody, session);
|
||||
log.info("Mail sent successfully");
|
||||
} catch (Exception e) {
|
||||
log.error("Error sending mail: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -19,4 +19,6 @@ public interface ClientCategoryMapper extends BaseMapper<ClientCategory> {
|
|||
BigDecimal getBalanceThresholdByCategoryId(@Param("id") String id);
|
||||
|
||||
String getClientCategoryByClientId(@Param("clientId") String clientId);
|
||||
|
||||
String getIdByCode(@Param("name") String categoryName);
|
||||
}
|
||||
|
|
|
@ -52,4 +52,6 @@ public interface SkuMapper extends BaseMapper<Sku> {
|
|||
List<Sku> findMissingSkusInNotShippedOrders(@Param("start") LocalDateTime start);
|
||||
|
||||
List<SkuQuantity> getSkuQuantitiesFromOrderIds(@Param("orderIds") List<String> orderIds);
|
||||
|
||||
List<Sku> fetchSkusByClient(@Param("clientId") String clientId);
|
||||
}
|
||||
|
|
|
@ -13,4 +13,9 @@
|
|||
ON c.client_category_id = cc.id
|
||||
WHERE c.id = #{clientId};
|
||||
</select>
|
||||
<select id="getIdByCode" resultType="java.lang.String">
|
||||
SELECT id
|
||||
FROM client_category
|
||||
WHERE name = #{name};
|
||||
</select>
|
||||
</mapper>
|
|
@ -151,4 +151,11 @@
|
|||
AND virtual_product_available = 0
|
||||
GROUP BY sku_id;
|
||||
</select>
|
||||
<select id="fetchSkusByClient" resultType="org.jeecg.modules.business.entity.Sku">
|
||||
SELECT s.id, s.erp_code, CONCAT(p.code, '(', p.zh_name,')') as product_id ,s.purchasing_amount, s.available_amount, s.image_source, s.shipping_discount, s.service_fee
|
||||
FROM sku s
|
||||
JOIN client_sku cs ON s.id = cs.sku_id
|
||||
JOIN product p ON s.product_id = p.id
|
||||
WHERE cs.client_id = #{clientId};
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -12,4 +12,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
public interface IClientCategoryService extends IService<ClientCategory> {
|
||||
|
||||
String getClientCategoryByClientId(String clientId);
|
||||
|
||||
String getIdByCode(String categoryName);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@ package org.jeecg.modules.business.service;
|
|||
|
||||
import org.jeecg.modules.business.entity.ClientSku;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.business.entity.Sku;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -13,4 +15,8 @@ import java.util.List;
|
|||
public interface IClientSkuService extends IService<ClientSku> {
|
||||
|
||||
public List<ClientSku> selectByMainId(String mainId);
|
||||
|
||||
List<String> saveClientSku(List<Sku> newSkus);
|
||||
|
||||
void addClientSku(String clientId, String skuId);
|
||||
}
|
||||
|
|
|
@ -93,4 +93,6 @@ public interface ISkuService extends IService<Sku> {
|
|||
List<Sku> findMissingSkusInNotShippedOrders(LocalDateTime start);
|
||||
|
||||
List<SkuQuantity> getSkuQuantitiesFromOrderIds(List<String> orderIds);
|
||||
|
||||
List<Sku> fetchSkusByClient(String clientId);
|
||||
}
|
||||
|
|
|
@ -11,6 +11,8 @@ import org.jeecg.modules.business.domain.excel.SheetManager;
|
|||
import org.jeecg.modules.business.domain.shippingInvoice.CompleteInvoice;
|
||||
import org.jeecg.modules.business.domain.shippingInvoice.ShippingInvoice;
|
||||
import org.jeecg.modules.business.domain.shippingInvoice.ShippingInvoiceFactory;
|
||||
import org.jeecg.modules.business.entity.Client;
|
||||
import org.jeecg.modules.business.entity.ClientCategory.CategoryName;
|
||||
import org.jeecg.modules.business.entity.PlatformOrder;
|
||||
import org.jeecg.modules.business.entity.SavRefundWithDetail;
|
||||
import org.jeecg.modules.business.mapper.*;
|
||||
|
@ -58,6 +60,8 @@ public class PlatformOrderShippingInvoiceService {
|
|||
@Autowired
|
||||
ClientMapper clientMapper;
|
||||
@Autowired
|
||||
IClientCategoryService clientCategoryService;
|
||||
@Autowired
|
||||
EmailService emailService;
|
||||
@Autowired
|
||||
ShopMapper shopMapper;
|
||||
|
@ -482,9 +486,10 @@ public class PlatformOrderShippingInvoiceService {
|
|||
clientShopIDsMap.put(id, shopService.listIdByClient(id));
|
||||
}
|
||||
for(Map.Entry<String, List<String>> entry: clientShopIDsMap.entrySet()) {
|
||||
Client client = clientMapper.selectById(entry.getKey());
|
||||
Period period = getValidPeriod(entry.getValue());
|
||||
if(!period.isValid()) {
|
||||
String internalCode = clientMapper.selectById(entry.getKey()).getInternalCode();
|
||||
String internalCode = client.getInternalCode();
|
||||
invoiceList.add(new InvoiceMetaData("", "error", internalCode, entry.getKey(), "No order to invoice."));
|
||||
continue;
|
||||
}
|
||||
|
@ -501,18 +506,23 @@ public class PlatformOrderShippingInvoiceService {
|
|||
InvoiceMetaData metaData;
|
||||
if(invoiceType == 0) {
|
||||
metaData = makeInvoice(param);
|
||||
balanceService.updateBalance(entry.getKey(), metaData.getInvoiceCode(), "shipping");
|
||||
if(client.getClientCategoryId().equals(clientCategoryService.getIdByCode(CategoryName.VIP.getName()))
|
||||
|| client.getClientCategoryId().equals(clientCategoryService.getIdByCode(CategoryName.CONFIRMED.getName())))
|
||||
balanceService.updateBalance(entry.getKey(), metaData.getInvoiceCode(), "shipping");
|
||||
}
|
||||
else {
|
||||
metaData = makeCompleteInvoicePostShipping(param, "post");
|
||||
balanceService.updateBalance(entry.getKey(), metaData.getInvoiceCode(), "complete");
|
||||
if(client.getClientCategoryId().equals(clientCategoryService.getIdByCode(CategoryName.VIP.getName()))
|
||||
|| client.getClientCategoryId().equals(clientCategoryService.getIdByCode(CategoryName.CONFIRMED.getName())))
|
||||
balanceService.updateBalance(entry.getKey(), metaData.getInvoiceCode(), "complete");
|
||||
}
|
||||
convertToPdf(metaData.getInvoiceCode(), "invoice");
|
||||
invoiceList.add(metaData);
|
||||
} catch (UserException | IOException | ParseException e) {
|
||||
String internalCode = clientMapper.selectById(entry.getKey()).getInternalCode();
|
||||
invoiceList.add(new InvoiceMetaData("", "error", internalCode, entry.getKey(), e.getMessage()));
|
||||
log.error(e.getMessage());
|
||||
} catch (MessagingException e) {
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
System.gc();
|
||||
|
|
|
@ -22,4 +22,9 @@ public class ClientCategoryServiceImpl extends ServiceImpl<ClientCategoryMapper,
|
|||
public String getClientCategoryByClientId(String clientId) {
|
||||
return clientCategoryMapper.getClientCategoryByClientId(clientId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getIdByCode(String categoryName) {
|
||||
return clientCategoryMapper.getIdByCode(categoryName);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
package org.jeecg.modules.business.service.impl;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.modules.business.entity.ClientSku;
|
||||
import org.jeecg.modules.business.entity.Sku;
|
||||
import org.jeecg.modules.business.mapper.ClientSkuMapper;
|
||||
import org.jeecg.modules.business.service.IClientService;
|
||||
import org.jeecg.modules.business.service.IClientSkuService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -14,14 +19,53 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
* @Date: 2021-04-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class ClientSkuServiceImpl extends ServiceImpl<ClientSkuMapper, ClientSku> implements IClientSkuService {
|
||||
|
||||
@Autowired
|
||||
private ClientSkuMapper clientSkuMapper;
|
||||
@Autowired
|
||||
private IClientService clientService;
|
||||
|
||||
@Override
|
||||
public List<ClientSku> selectByMainId(String mainId) {
|
||||
return clientSkuMapper.selectByMainId(mainId);
|
||||
}
|
||||
@Override
|
||||
public List<String> saveClientSku(List<Sku> newSkus) {
|
||||
List<String> unknownSkuErpCode = new ArrayList<>(); // sku erp code that we couldn't find client for
|
||||
for(Sku sku : newSkus) {
|
||||
String erpCode = sku.getErpCode();
|
||||
if(erpCode == null) {
|
||||
log.info("Couldn't associate sku \"{}\" with any client. ErpCode is NULL", sku.getId());
|
||||
unknownSkuErpCode.add("Sku ID : " + sku.getId() + " - ErpCode is NULL");
|
||||
continue;
|
||||
}
|
||||
int index = erpCode.lastIndexOf("-");
|
||||
if(index == -1) {
|
||||
log.info("Couldn't associate sku \"{}\" with any client. Wrong format", erpCode);
|
||||
unknownSkuErpCode.add(erpCode + " - Wrong format");
|
||||
continue;
|
||||
}
|
||||
String internalCode = erpCode.substring(index+1);
|
||||
String clientId = clientService.getClientIdByCode(internalCode);
|
||||
if(clientId == null) {
|
||||
log.info("Couldn't associate sku \"{}\" with any client. ", erpCode);
|
||||
unknownSkuErpCode.add(erpCode);
|
||||
continue;
|
||||
}
|
||||
log.info("Associating sku \"{}\" with client \"{}\". ", sku.getErpCode(), clientId);
|
||||
addClientSku(clientId, sku.getId());
|
||||
}
|
||||
return unknownSkuErpCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addClientSku(String clientId, String skuId) {
|
||||
ClientSku clientSku = new ClientSku();
|
||||
clientSku.setClientId(clientId);
|
||||
clientSku.setSkuId(skuId);
|
||||
clientSkuMapper.insert(clientSku);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package org.jeecg.modules.business.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import freemarker.template.Template;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.modules.business.domain.api.mabang.doSearchSkuList.SkuData;
|
||||
import org.jeecg.modules.business.domain.api.mabang.doSearchSkuList.SkuListRequestErrorException;
|
||||
|
@ -11,9 +12,15 @@ import org.jeecg.modules.business.entity.SkuPrice;
|
|||
import org.jeecg.modules.business.mapper.SkuListMabangMapper;
|
||||
import org.jeecg.modules.business.service.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.ui.freemarker.FreeMarkerTemplateUtils;
|
||||
import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer;
|
||||
|
||||
import javax.mail.Authenticator;
|
||||
import javax.mail.PasswordAuthentication;
|
||||
import javax.mail.Session;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
@ -28,21 +35,25 @@ import static java.util.stream.Collectors.toList;
|
|||
@Service
|
||||
@Slf4j
|
||||
public class SkuListMabangServiceImpl extends ServiceImpl<SkuListMabangMapper, SkuData> implements ISkuListMabangService {
|
||||
private final SkuListMabangMapper skuListMabangMapper;
|
||||
private final IProductService productService;
|
||||
private final ISkuService skuService;
|
||||
private final ISkuPriceService skuPriceService;
|
||||
private final ISkuDeclaredValueService skuDeclaredValueService;
|
||||
|
||||
@Autowired
|
||||
public SkuListMabangServiceImpl(SkuListMabangMapper skuListMabangMapper, IProductService productService,
|
||||
ISkuService skuService, ISkuPriceService skuPriceService, ISkuDeclaredValueService skuDeclaredValueService) {
|
||||
this.skuListMabangMapper = skuListMabangMapper;
|
||||
this.productService = productService;
|
||||
this.skuService = skuService;
|
||||
this.skuPriceService = skuPriceService;
|
||||
this.skuDeclaredValueService = skuDeclaredValueService;
|
||||
}
|
||||
private SkuListMabangMapper skuListMabangMapper;
|
||||
@Autowired
|
||||
private IProductService productService;
|
||||
@Autowired
|
||||
private ISkuService skuService;
|
||||
@Autowired
|
||||
private ISkuPriceService skuPriceService;
|
||||
@Autowired
|
||||
private ISkuDeclaredValueService skuDeclaredValueService;
|
||||
@Autowired
|
||||
private IClientSkuService clientSkuService;
|
||||
@Autowired
|
||||
private EmailService emailService;
|
||||
@Autowired
|
||||
private FreeMarkerConfigurer freemarkerConfigurer;
|
||||
@Autowired
|
||||
Environment env;
|
||||
|
||||
|
||||
/**
|
||||
* Save skus to DB from mabang api.
|
||||
|
@ -97,6 +108,35 @@ public class SkuListMabangServiceImpl extends ServiceImpl<SkuListMabangMapper, S
|
|||
newSkus = createSkus(newSkuDatas);
|
||||
skuService.saveBatch(newSkus);
|
||||
|
||||
// attributing sku to client
|
||||
List<String> unknownClientSkus = clientSkuService.saveClientSku(newSkus);
|
||||
|
||||
// send email for manual check
|
||||
if(!unknownClientSkus.isEmpty()) {
|
||||
log.info("Sending email for manual check.");
|
||||
Properties prop = emailService.getMailSender();
|
||||
Session session = Session.getInstance(prop, new Authenticator() {
|
||||
@Override
|
||||
protected PasswordAuthentication getPasswordAuthentication() {
|
||||
return new PasswordAuthentication(env.getProperty("spring.mail.username"), env.getProperty("spring.mail.password"));
|
||||
}
|
||||
});
|
||||
|
||||
String subject = "Association of Sku to Client failed while creating new Sku";
|
||||
String destEmail = env.getProperty("spring.mail.username");
|
||||
Map<String, Object> templateModel = new HashMap<>();
|
||||
templateModel.put("skus", unknownClientSkus);
|
||||
try {
|
||||
freemarkerConfigurer = emailService.freemarkerClassLoaderConfig();
|
||||
Template template = freemarkerConfigurer.getConfiguration().getTemplate("admin/unknownClientForSku.ftl");
|
||||
String htmlBody = FreeMarkerTemplateUtils.processTemplateIntoString(template, templateModel);
|
||||
emailService.sendSimpleMessage(destEmail, subject, htmlBody, session);
|
||||
log.info("Mail sent successfully");
|
||||
} catch (Exception e) {
|
||||
log.error("Error sending mail: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
// adding the additional information to List and pairing it to a sku with the associated product code
|
||||
List<String> productIdInMap = new ArrayList<>();
|
||||
for(Sku sku : newSkus) {
|
||||
|
|
|
@ -2,6 +2,7 @@ package org.jeecg.modules.business.service.impl;
|
|||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.modules.business.controller.UserException;
|
||||
|
@ -32,6 +33,7 @@ import java.util.stream.Collectors;
|
|||
* @Date: 2021-06-28
|
||||
* @Version: V1.1
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements ISkuService {
|
||||
|
||||
|
@ -408,4 +410,9 @@ public class SkuServiceImpl extends ServiceImpl<SkuMapper, Sku> implements ISkuS
|
|||
public List<SkuQuantity> getSkuQuantitiesFromOrderIds(List<String> orderIds) {
|
||||
return skuMapper.getSkuQuantitiesFromOrderIds(orderIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Sku> fetchSkusByClient(String clientId) {
|
||||
return skuMapper.fetchSkusByClient(clientId);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
<#include "../components/header.ftl">
|
||||
<tr>
|
||||
<td style="padding:35px 0;">Cher Collègue</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:0 0 35px 0;">Un ou plusieurs SKU n'ont pas pu être attribué à un client :</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<ul>
|
||||
<#if skus?size = 0 >
|
||||
<li>Aucune erreur</li>
|
||||
<#else>
|
||||
<#list skus as sku>
|
||||
<li>${sku}</li>
|
||||
</#list>
|
||||
</#if>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<#include "../components/footer.ftl">
|
Loading…
Reference in New Issue