Commit b76458de authored by hezhen's avatar hezhen

123

parent e15464af
......@@ -32,5 +32,7 @@ public class CompanySearchDTO extends PageParam implements DataInter {
Integer goodsType;
Integer isBrowse;
}
......@@ -69,6 +69,7 @@ public class AppBranchCompanyController extends BaseController<BranchCompanyBiz>
if (list.size() == 0){
throw new BaseException("店铺不存在", ResultCode.FAILED_CODE);
}
doBrowse(companySearchDTO);
return ObjectRestResponse.succ(list.get(0));
}
......@@ -110,4 +111,24 @@ public class AppBranchCompanyController extends BaseController<BranchCompanyBiz>
return ObjectRestResponse.succ();
}
public void doBrowse(CompanySearchDTO companySearchDTO){
try {
Integer isBrowse = companySearchDTO.getIsBrowse() == null ? 0 :companySearchDTO.getIsBrowse();
Integer companyId = companySearchDTO.getId() == null ? 0 : companySearchDTO.getId();
if (isBrowse == 1 && companyId > 0){
BranchCompany branchCompany1 = baseBiz.selectById(companyId);
if (branchCompany1 != null){
BranchCompany branchCompany=new BranchCompany();
branchCompany.setId(companyId);
branchCompany.setGiveNum(branchCompany1.getBrowseNum()+1);
baseBiz.addOrUpd(branchCompany);
}
}
}catch (Exception e){
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment