Commit 03f8f53a authored by hezhen's avatar hezhen

修改商品详情

parent ee9a082f
......@@ -172,4 +172,13 @@ public class BranchCompany {
@Column(name = "is_del")
private Integer isDel;
//浏览量
@Column(name = "browse_num")
private Integer browseNum;
//点赞数量
@Column(name = "give_num")
private Integer giveNum;
}
\ No newline at end of file
......@@ -128,7 +128,7 @@ public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany
* @param id
* @return
*/
@Cache(key = RedisKey.BRANCH_COMPANY_CACHE + "{1}")
//@Cache(key = RedisKey.BRANCH_COMPANY_CACHE + "{1}")
public CompanyDetail getDetailById(Integer id) {
BranchCompany branchCompany = this.getById(id);
CompanyDetail detail = null;
......@@ -518,4 +518,5 @@ public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany
return ObjectRestResponse.succ();
}
}
......@@ -1604,6 +1604,7 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
}
Vehicle vehicle= JSONUtil.toBean(vehicleApply.getChangeJson(),Vehicle.class);
if (StringUtils.isNotBlank(vehicleId)){
vehicle.setExtensionList(null);
if (!CheckObjectIsNullUtils.objCheckIsNull(vehicle) ){
vehicle.setId(vehicleId);
updateSelectiveById(vehicle);
......@@ -1640,6 +1641,12 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
}
public Long countByCompanyId(Integer companyId){
return mapper.countByCompamyId(companyId);
}
......
......@@ -62,4 +62,7 @@ public interface VehicleMapper extends Mapper<Vehicle> {
List<Vehicle> getAllVehicleByParam(Map<String, Object> param);
List<VehicleVO> selectList(VehicleFindDTO vehicleFindDTO);
@Select("SELECT COUNT(*) FROM vehicle WHERE is_del=0 and subordinate_branch = #{commpanyId}")
Long countByCompamyId(@Param("commpanyId") Integer commpanyId);
}
\ No newline at end of file
package com.xxfc.platform.vehicle.rest;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.xxfc.platform.vehicle.biz.VehicleApplyBiz;
......@@ -54,8 +55,10 @@ public class AppVehicleController extends BaseController<VehicleBiz> {
return ObjectRestResponse.succ(baseBiz.info(vehicleFindDTO));
}
@GetMapping("detail/{id}")
@GetMapping("app/unauth/detail/{id}")
@ApiModelProperty("商品详情")
@IgnoreUserToken
public ObjectRestResponse detail(@PathVariable("id") String id ) {
VehicleFindDTO vehicleFindDTO =new VehicleFindDTO();
vehicleFindDTO.setVehicleId(id);
......@@ -67,6 +70,13 @@ public class AppVehicleController extends BaseController<VehicleBiz> {
}
@GetMapping("app/unauth/countByCompamyId/{id}")
@ApiModelProperty("商品详情")
@IgnoreUserToken
public ObjectRestResponse countByCompamyId(@PathVariable("id") Integer id ) {
return ObjectRestResponse.succ(baseBiz.countByCompanyId(id));
}
......
package com.xxfc.platform.vehicle.rest;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.xxfc.platform.vehicle.biz.VehicleExtensionBiz;
import com.xxfc.platform.vehicle.pojo.vo.VehicleExtensionVO;
......@@ -42,6 +43,20 @@ public class AppVehicleExtensionController extends BaseController<VehicleExtensi
}
@GetMapping("app/unauth/tree")
@ApiModelProperty("商品详情")
@IgnoreClientToken
public ObjectRestResponse tree(@RequestParam(value = "vehicleId",defaultValue = "")String vehicleId,@RequestParam(value = "extensionList",defaultValue = "")String extensionList) {
List<VehicleExtensionVO> list=null;
if (StringUtils.isNotBlank(vehicleId)){
list=baseBiz.getTree(vehicleId);
}else if (StringUtils.isNotBlank(extensionList)){
list=baseBiz.getTreeByApply(Arrays.asList(extensionList.split(",")).parallelStream().map(s -> Integer.valueOf(s)).collect(Collectors.toList()));
}
return ObjectRestResponse.succ(list);
}
......
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