|
@@ -43,7 +43,7 @@ import org.springframework.web.context.ContextLoader;
|
|
|
import org.springframework.web.context.WebApplicationContext;
|
|
|
|
|
|
@Controller
|
|
|
-@RequestMapping("/wechat/product")
|
|
|
+@RequestMapping("/product")
|
|
|
public class ProductInfoHandler {
|
|
|
|
|
|
@Autowired
|
|
@@ -679,7 +679,7 @@ public class ProductInfoHandler {
|
|
|
public ResultMsg listProductType(){
|
|
|
ResultMsg rm=new ResultMsg();
|
|
|
List<ProductType> list=productInfoService.listProductType();
|
|
|
- if(list.size()<0||list==null){
|
|
|
+ if(list!=null&&list.size()<0){
|
|
|
rm.setStatus(false);
|
|
|
rm.setResultCode(ResultInfo.ERRORCODE);
|
|
|
rm.setMessage(NameUtils.getConfig("ERRORINFO"));
|
|
@@ -701,11 +701,11 @@ public class ProductInfoHandler {
|
|
|
*/
|
|
|
@ResponseBody
|
|
|
@RequestMapping("/listProductColorByTypeId")
|
|
|
- public ResultMsg listProductColorByTypeId( @RequestParam(value= "typeId",required=false) Integer typeId,
|
|
|
+ public ResultMsg listProductColorByTypeId( @RequestParam(value= "typeId") Integer typeId,
|
|
|
@RequestParam(value= "pageSize",defaultValue= "6" ,required=false) Integer pageSize,
|
|
|
@RequestParam(value = "pageNO", defaultValue = "1",required=false) Integer pageNO){
|
|
|
ResultMsg rm=new ResultMsg();
|
|
|
- if(typeId!=null&&typeId<=0){
|
|
|
+ if(typeId!=null&&typeId<0){
|
|
|
rm.setStatus(false);
|
|
|
rm.setResultCode(ResultInfo.ERRORCODE);
|
|
|
rm.setMessage(NameUtils.getConfig("ERRORINFO"));
|
|
@@ -718,7 +718,7 @@ public class ProductInfoHandler {
|
|
|
productColor.getPage().setPageNumber(pageNO);
|
|
|
productColor.getPage().initRecordBegin();
|
|
|
List<ProductColor> list=productInfoService.listProductColorByTypeId(productColor);
|
|
|
- if(list==null||list.size()<=0){
|
|
|
+ if(list!=null&&list.size()<0){
|
|
|
rm.setStatus(false);
|
|
|
rm.setResultCode(ResultInfo.ERRORCODE);
|
|
|
return rm;
|
|
@@ -739,9 +739,9 @@ public class ProductInfoHandler {
|
|
|
*/
|
|
|
@RequestMapping("/getProductByColorId")
|
|
|
@ResponseBody
|
|
|
- public ResultMsg getProductByColorId(@RequestParam(value= "colorId",required=false)Integer colorId){
|
|
|
+ public ResultMsg getProductByColorId(@RequestParam(value= "colorId")Integer colorId){
|
|
|
ResultMsg rm=new ResultMsg();
|
|
|
- if(colorId<0){
|
|
|
+ if(colorId!=null&&colorId<0){
|
|
|
rm.setStatus(false);
|
|
|
rm.setResultCode(ResultInfo.ERRORCODE);
|
|
|
rm.setMessage(NameUtils.getConfig("ERRORINFO"));
|