|
@@ -61,16 +61,14 @@ public class TemplateLogic {
|
|
|
.orderByAsc(CommonTemplate::getCommonTemplateId)
|
|
|
.orderByDesc(CommonTemplate::getCreateTime)
|
|
|
.eq(CommonTemplate::getType,type)
|
|
|
- .in(CollectionUtils.isNotEmpty(companyWechatIds), CommonTemplate::getCompanyWechatId, companyWechatIds)
|
|
|
+ // .in(CollectionUtils.isNotEmpty(companyWechatIds), CommonTemplate::getCompanyWechatId, companyWechatIds)
|
|
|
.page(new Page<>(pageNum, pageSize));
|
|
|
}
|
|
|
|
|
|
@Transactional
|
|
|
public String save(TemplateBean templateBean, HttpServletRequest request) throws ParseException {
|
|
|
AdminUserCom adminUser = commonLogic.getAdminUser(request);
|
|
|
- if (StringUtils.isEmpty(adminUser.getLoginCompanyWechatId())) {
|
|
|
- throw new RemoteServiceException("无效微信企业id");
|
|
|
- }
|
|
|
+
|
|
|
if(templateBean.getType() == null){
|
|
|
templateBean.setType(1);
|
|
|
}
|
|
@@ -79,8 +77,7 @@ public class TemplateLogic {
|
|
|
commonTemplate.setName(templateBean.getName());
|
|
|
commonTemplate.setCreateTime(new Date());
|
|
|
commonTemplate.setType(templateBean.getType());
|
|
|
- commonTemplate.setCompanyWechatId(adminUser.getLoginCompanyWechatId());
|
|
|
- commonTemplate.setCompanyName(adminUser.getLoginCompanyName());
|
|
|
+
|
|
|
commonTemplate.setLogo(templateBean.getLogo());
|
|
|
if(templateBean.getLogoStartTime() != null) {
|
|
|
commonTemplate.setLogoStartTime(DateUtils.parseDate(templateBean.getLogoStartTime()));
|
|
@@ -98,8 +95,6 @@ public class TemplateLogic {
|
|
|
goodsTemplate.setGoodsId(goodsId);
|
|
|
goodsTemplate.setTemplateId(commonTemplate.getCommonTemplateId());
|
|
|
goodsTemplate.setCreateTime(new Date());
|
|
|
- goodsTemplate.setCompanyWechatId(adminUser.getLoginCompanyWechatId());
|
|
|
- goodsTemplate.setCompanyName(adminUser.getLoginCompanyName());
|
|
|
goodsTemplateList.add(goodsTemplate);
|
|
|
}
|
|
|
goodsTemplateService.saveBatch(goodsTemplateList);
|