|
|
@@ -9,6 +9,7 @@ import com.uas.platform.b2c.common.account.dao.EnterpriseDao;
|
|
|
import com.uas.platform.b2c.common.account.model.Enterprise;
|
|
|
import com.uas.platform.b2c.common.account.model.User;
|
|
|
import com.uas.platform.b2c.core.config.SysConf;
|
|
|
+import com.uas.platform.b2c.core.constant.ShortConstant;
|
|
|
import com.uas.platform.b2c.core.constant.SplitChar;
|
|
|
import com.uas.platform.b2c.core.support.SystemSession;
|
|
|
import com.uas.platform.b2c.core.utils.DoubleArith;
|
|
|
@@ -2370,4 +2371,53 @@ public class GoodsServiceImpl implements GoodsService {
|
|
|
public void addVisitCount(String batchCode) {
|
|
|
goodsDao.addVisitCount(batchCode);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Page<Goods> getPageDataOfBackground(PageInfo info, String code, String brand, String store, String kindUuid, Integer saleStatus, Integer saleNum, String currency, Short saleSelf, Boolean breakUp, Integer standard, Integer audited, Short haveImg) {
|
|
|
+// if (CollectionUtils)
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ private void convertPageInfo(PageInfo info, String code, String brand, String store, String kindUuid,
|
|
|
+ Integer saleStatus, Integer saleNum, String currency,
|
|
|
+ Short saleSelf, Boolean breakUp, Integer standard,
|
|
|
+ Integer audited, Short haveImg) {
|
|
|
+ if (StringUtils.hasText(code)) {
|
|
|
+ info.filter("code", code);
|
|
|
+ }
|
|
|
+ if (StringUtils.hasText(brand)) {
|
|
|
+ SimpleExpression[] brandExpression = new SimpleExpression[2];
|
|
|
+ brandExpression[0] = PredicateUtils.like("brandNameCn", brand, false, true);
|
|
|
+ brandExpression[1] = PredicateUtils.like("brandNameEn", brand, false, true);
|
|
|
+ info.expression(PredicateUtils.or((CriterionExpression[]) brandExpression));
|
|
|
+ }
|
|
|
+ if (StringUtils.hasText(store)) {
|
|
|
+ SimpleExpression[] storeExpression = new SimpleExpression[2];
|
|
|
+ storeExpression[0] = PredicateUtils.like("enUU", store, false, true);
|
|
|
+ storeExpression[1] = PredicateUtils.like("enterpriseName", store, false, true);
|
|
|
+ info.expression(PredicateUtils.or((CriterionExpression[]) storeExpression));
|
|
|
+ }
|
|
|
+ if (StringUtils.hasText(kindUuid)) {
|
|
|
+ // 如果包含多个叶子类目ID,则获取所有的叶子类目对应的商品信息
|
|
|
+ if (kindUuid.contains(SplitChar.COMMA)) {
|
|
|
+ String[] kindIds = kindUuid.split(SplitChar.COMMA);
|
|
|
+ info.expression(PredicateUtils.in("kindUuid", kindIds, false));
|
|
|
+ } else {
|
|
|
+ info.expression(PredicateUtils.eq("kindUuid", kindUuid, false));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (StringUtils.hasText(currency)) {
|
|
|
+ info.expression(PredicateUtils.eq("currencyName", currency, false));
|
|
|
+ }
|
|
|
+ if (saleSelf != null) {
|
|
|
+ if (saleSelf.equals(ShortConstant.NO_SHORT)) {
|
|
|
+ info.expression(PredicateUtils.ne("storeid", sysConf.getStoreid(), false));
|
|
|
+ } else {
|
|
|
+ info.expression(PredicateUtils.eq("storeid", sysConf.getStoreid(), false));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (breakUp != null) {
|
|
|
+ info.filter("breakUp", breakUp, false);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|