修改了各级审核商品信息的功能模块

This commit is contained in:
XinYi Song 2021-12-17 10:44:28 +08:00
parent 7e7fea4ae1
commit 84cac956a5

View File

@ -15,6 +15,7 @@ import com.xkrs.utils.DateTimeUtil;
import com.xkrs.utils.Query; import com.xkrs.utils.Query;
import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.time.LocalDateTime; import java.time.LocalDateTime;
@ -59,7 +60,7 @@ public class ProductServiceImpl implements ProductService {
List<String> productCover = productQo.getProductCover(); List<String> productCover = productQo.getProductCover();
// 商品内容图片 // 商品内容图片
List<String> productContent = productQo.getProductContent(); List<String> productContent = productQo.getProductContent();
BusinessEntity byBusinessId = businessDao.findByBusinessId(business); BusinessEntity byBusinessId = businessDao.findByBusinessIdAndBusinessType(business,"1");
if(byBusinessId == null){ if(byBusinessId == null){
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE,"您还未入驻,请先入驻!",locale); return outputEncapsulationObject(PromptMessageEnum.DATA_NONE,"您还未入驻,请先入驻!",locale);
} }
@ -142,6 +143,7 @@ public class ProductServiceImpl implements ProductService {
* @param reviewType * @param reviewType
* @return * @return
*/ */
@Transactional(rollbackFor=Exception.class)
@Override @Override
public String updateReviewType(Integer productId, String reviewType) { public String updateReviewType(Integer productId, String reviewType) {
Locale locale = LocaleContextHolder.getLocale(); Locale locale = LocaleContextHolder.getLocale();
@ -152,7 +154,7 @@ public class ProductServiceImpl implements ProductService {
if(reviewType.equals(byId.getReviewType()) || reviewType.compareTo(byId.getReviewType()) < 0){ if(reviewType.equals(byId.getReviewType()) || reviewType.compareTo(byId.getReviewType()) < 0){
return outputEncapsulationObject(PromptMessageEnum.PROCESS_FAIL,"操作错误!",locale); return outputEncapsulationObject(PromptMessageEnum.PROCESS_FAIL,"操作错误!",locale);
} }
if(reviewType.equals("3")){ if("3".equals(reviewType)){
String dateTimeToString = DateTimeUtil.dateTimeToString(LocalDateTime.now()); String dateTimeToString = DateTimeUtil.dateTimeToString(LocalDateTime.now());
productDao.updateShelfType(productId,"1",dateTimeToString); productDao.updateShelfType(productId,"1",dateTimeToString);
} }