Commit e17e479c authored by 黎聪聪's avatar 黎聪聪

2020年11月2日 19:43:14

parent caa5f1a7
...@@ -169,15 +169,15 @@ public class ProductServiceImpl extends GenericServiceImpl<Product> implements P ...@@ -169,15 +169,15 @@ public class ProductServiceImpl extends GenericServiceImpl<Product> implements P
} }
@Override @Override
public JSONObject productId(Long ID,String appId) { public JSONObject productId(Long id,String appId) {
JSONObject rtnJson = new JSONObject(); JSONObject rtnJson = new JSONObject();
try { try {
if (ID.equals("")){ if (id==null){
rtnJson.put("errorNO","1"); rtnJson.put("errorNO","1");
rtnJson.put("errorMsg","id不能为空"); rtnJson.put("errorMsg","id不能为空");
return rtnJson; return rtnJson;
} }
List<ProductVO> product = productMapper.product(ID); List<ProductVO> product = productMapper.product(id);
if (product==null){ if (product==null){
rtnJson.put("errorNO","1"); rtnJson.put("errorNO","1");
rtnJson.put("errorMsg","查询失败"); rtnJson.put("errorMsg","查询失败");
......
...@@ -33,8 +33,8 @@ public class MobileProductController { ...@@ -33,8 +33,8 @@ public class MobileProductController {
* @return * @return
**/ **/
@RequestMapping(value = "/productId",method = {RequestMethod.GET,RequestMethod.POST},produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "/productId",method = {RequestMethod.GET,RequestMethod.POST},produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public JSONObject productMenu(Long ID,String appId){ public JSONObject productMenu(Long id,String appId){
return productService.productId(ID,appId); return productService.productId(id,appId);
} }
} }
...@@ -48,7 +48,7 @@ public interface CfarticleMapper extends GenericDao<Cfarticle> { ...@@ -48,7 +48,7 @@ public interface CfarticleMapper extends GenericDao<Cfarticle> {
* @Param * @Param
* @return * @return
**/ **/
List<CfarticleVO> recommended(Long id); List<CfarticleVO> recommended(@Param("id")Long id);
/** /**
* @Author Licc * @Author Licc
* @Description 阅读量 * @Description 阅读量
......
...@@ -340,7 +340,7 @@ ...@@ -340,7 +340,7 @@
where id = #{id} where id = #{id}
</update> </update>
<select id="recommended" resultType="com.cftech.cms.cfarticle.model.CfarticleVO" parameterType="java.lang.Long"> <select id="recommended" resultType="com.cftech.cms.cfarticle.model.CfarticleVO" >
select select
a.id, a.id,
a.title, a.title,
......
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