提交 cfb9ccf9 authored 作者: liupengfei's avatar liupengfei

--no commit message

上级 a5821d26
......@@ -6,6 +6,7 @@ import java.util.Map;
import java.util.stream.Collectors;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -24,6 +25,7 @@ import com.zrqx.member.bg.pmember.service.PersonalMemberService;
import com.zrqx.member.bg.vip.service.VipService;
import com.zrqx.member.commons.model.PersonalMember;
import com.zrqx.member.commons.model.Vip;
import com.zrqx.member.commons.vo.bg.member.VipVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -69,9 +71,17 @@ public class VipController {
@ApiOperation(value = "查询", notes = "根据ID查询")
@GetMapping(value = "{oid}")
public CallBack<Vip> getById(@PathVariable Integer oid) {
public CallBack<VipVo> getById(@PathVariable Integer oid) {
Vip entity = service.selectByPrimaryKey(oid);
return CallBack.success(entity);
VipVo vo = new VipVo();
BeanUtils.copyProperties(entity, vo);
if(entity.getPrice() != null) {
vo.setPrice(entity.getPrice().toString());
}
if(entity.getSellprice() != null) {
vo.setSellprice(entity.getSellprice().toString());
}
return CallBack.success(vo);
}
@ApiOperation(value = "分页查询", notes = "分页查询")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论