|
|
@@ -1225,14 +1225,21 @@ public class ProductServiceImpl implements ProductService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Map<String, Integer> getProductCount() {
|
|
|
+ public Map<String, Integer> getProductCount(Integer isPerson) {
|
|
|
Map<String, Integer> resultMap = new HashMap<>();
|
|
|
Long enUU = SystemSession.getUser().getEnterprise().getUu();
|
|
|
+ Long userUU = SystemSession.getUser().getUserUU();
|
|
|
if (enUU == null){
|
|
|
throw new IllegalOperatorException("店铺信息丢失,请刷新后重试");
|
|
|
}
|
|
|
- int standard = productDao.getCountByEnuuAndStatusAndEnabled(enUU, ShortConstant.YES_SHORT, IntegerConstant.YES_SHORT);
|
|
|
- int nStandard = productDao.getCountByEnuuAndStatusAndEnabled(enUU, ShortConstant.NO_SHORT, IntegerConstant.YES_SHORT);
|
|
|
+ int standard,nStandard;
|
|
|
+ if (null != isPerson && isPerson.intValue() == IntegerConstant.YES_SHORT.intValue()){
|
|
|
+ standard = v_productPersonDao.getCountByEnuuAndUserUUAndStatusAndEnabled(enUU, userUU, ShortConstant.YES_SHORT, IntegerConstant.YES_SHORT);
|
|
|
+ nStandard = v_productPersonDao.getCountByEnuuAndUserUUAndStatusAndEnabled(enUU, userUU, ShortConstant.NO_SHORT, IntegerConstant.YES_SHORT);
|
|
|
+ } else {
|
|
|
+ standard = productDao.getCountByEnuuAndStatusAndEnabled(enUU, ShortConstant.YES_SHORT, IntegerConstant.YES_SHORT);
|
|
|
+ nStandard = productDao.getCountByEnuuAndStatusAndEnabled(enUU, ShortConstant.NO_SHORT, IntegerConstant.YES_SHORT);
|
|
|
+ }
|
|
|
resultMap.put("standard", standard);
|
|
|
resultMap.put("nStandard", nStandard);
|
|
|
return resultMap;
|