...
|
...
|
@@ -4,12 +4,12 @@ import com.alibaba.fastjson.JSONObject; |
|
|
import com.yoho.core.common.utils.DateUtil;
|
|
|
import com.yoho.ufo.dal.BrandMapper;
|
|
|
import com.yoho.ufo.model.brand.Brand;
|
|
|
import com.yoho.ufo.service.IBrandService;
|
|
|
import com.yoho.ufo.util.OrikaUtils;
|
|
|
import com.yohobuy.ufo.model.common.PageModel;
|
|
|
import com.yohobuy.ufo.model.common.PageResponseBO;
|
|
|
import com.yohobuy.ufo.model.request.brand.BrandRequestBo;
|
|
|
import com.yohobuy.ufo.model.request.brand.BrandResponseBo;
|
|
|
import com.yoho.ufo.service.IBrandService;
|
|
|
import com.yoho.ufo.util.OrikaUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.stereotype.Service;
|
...
|
...
|
@@ -35,8 +35,7 @@ public class BrandServiceImpl implements IBrandService { |
|
|
LOGGER.info("insertOrUpdateBrand param = {}", brandRequestBo);
|
|
|
Brand brand = OrikaUtils.map(brandRequestBo, Brand.class);
|
|
|
brand.setEditTime(DateUtil.currentTimeSeconds());
|
|
|
// TODO
|
|
|
brand.setEditPid(10086);
|
|
|
brand.setEditPid(getUserId());
|
|
|
if (brand.getId() == null || brand.getId() == 0) {
|
|
|
// 默认开启状态
|
|
|
brand.setStatus(1);
|
...
|
...
|
@@ -85,11 +84,15 @@ public class BrandServiceImpl implements IBrandService { |
|
|
LOGGER.info("updateBrandStatus param = {}", requestBo);
|
|
|
Brand brand = OrikaUtils.map(requestBo, Brand.class);
|
|
|
brand.setEditTime(DateUtil.currentTimeSeconds());
|
|
|
// TODO
|
|
|
brand.setEditPid(1111111);
|
|
|
brand.setEditPid(getUserId());
|
|
|
return brandMapper.updateBrandStatus(brand);
|
|
|
}
|
|
|
|
|
|
private Integer getUserId() {
|
|
|
Integer userId = (new UserHelper()).getUserId();
|
|
|
return userId == null ? 0 : userId;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<JSONObject> getBrandIdAndName() {
|
|
|
// TODO 可以添加缓存
|
...
|
...
|
|