|
@@ -6,6 +6,9 @@ import java.util.List;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
+import com.iamberry.wechat.core.entity.ResultMsg;
|
|
|
+import com.iamberry.wechat.tools.NameUtils;
|
|
|
+import com.iamberry.wechat.tools.ResultInfo;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
@@ -136,4 +139,26 @@ public class ProductTypeHandler {
|
|
|
}
|
|
|
return "{\"status\":\"修改成功!\"}";
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询正在使用的产品类型列表
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping("/listProductType")
|
|
|
+ @ResponseBody
|
|
|
+ public ResultMsg listProductType(){
|
|
|
+ ResultMsg rm=new ResultMsg();
|
|
|
+ List<ProductType> list=productTypeService.listProductType();
|
|
|
+ if(list.size()<0){
|
|
|
+ rm.setStatus(false);
|
|
|
+ rm.setResultCode(ResultInfo.ERRORCODE);
|
|
|
+ rm.setMessage(NameUtils.getConfig("ERRORINFO"));
|
|
|
+ return rm;
|
|
|
+ }
|
|
|
+ rm.setData(list);
|
|
|
+ rm.setResultCode(ResultInfo.SUCCESSCODE);
|
|
|
+ rm.setMessage(NameUtils.getConfig("SUCCESSINFO"));
|
|
|
+ rm.setStatus(true);
|
|
|
+ return rm;
|
|
|
+ }
|
|
|
}
|