NutzCN Logo
问答 调用入口函数方法 影响
发布于 2797天前 作者 qq_68fbea12 1744 次浏览 复制 上一个帖子 下一个帖子
标签:

我入口方法里,调用函数,报错,之前没问题,如果把方法单独放到一个子入口函数,调用方法就没问题
这是我的入口函数

package com.tongxin.b2b.controller;


import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.By;
import org.nutz.mvc.annotation.Encoding;
import org.nutz.mvc.annotation.Filters;
import org.nutz.mvc.annotation.Modules;
import org.nutz.mvc.annotation.Ok;
import org.nutz.mvc.annotation.POST;
import org.nutz.mvc.annotation.Param;
import org.nutz.mvc.filter.CrossOriginFilter;
import com.tongxin.b2b.service.AddressService;
import com.tongxin.b2b.service.AdminService;
import com.tongxin.b2b.service.BuyerService;
import com.tongxin.b2b.service.CommonalityService;
import com.tongxin.b2b.service.CompanyService;
import com.tongxin.b2b.service.ConferenceService;
import com.tongxin.b2b.service.IAddressService;
import com.tongxin.b2b.service.IAdminService;
import com.tongxin.b2b.service.IBuyerService;
import com.tongxin.b2b.service.ICommonalityService;
import com.tongxin.b2b.service.ICompanyService;
import com.tongxin.b2b.service.IConferenceService;
import com.tongxin.b2b.service.INewsService;
import com.tongxin.b2b.service.IOs_examineService;
import com.tongxin.b2b.service.IOs_publicService;
import com.tongxin.b2b.service.IOs_pulldownService;
import com.tongxin.b2b.service.IOs_recommendService;
import com.tongxin.b2b.service.IShopService;
import com.tongxin.b2b.service.IUserService;
import com.tongxin.b2b.service.NewsService;
import com.tongxin.b2b.service.Os_examineService;
import com.tongxin.b2b.service.Os_publicService;
import com.tongxin.b2b.service.Os_pulldownService;
import com.tongxin.b2b.service.Os_recommendService;
import com.tongxin.b2b.service.ShopService;
import com.tongxin.b2b.service.UserService;
import com.tongxin.util.Translate;


@Filters(@By(type=CrossOriginFilter.class))
@Encoding(input="UTF-8",output="UTF-8")
@Modules({zMain.class})
public class Main {
	Map<String, String> map = new HashMap<String, String>();
	/*
	 * 获取图片验证码
	 * tel 必填 手机号
	 * req 必填 自动获取
	 * resp 必填 自动获取
	 */
	@At("/getImgAuthCode")
	@Ok("raw")
	public void getImgAuthCode(@Param("tel")String tel, @Param("time")String time, HttpServletRequest req, HttpServletResponse resp){
		IUserService service = new UserService();
		service.getImgAuthCode(tel, req, resp);
	}
	
	/*
	 * 手机号是否被注册
	 * tel 必填 手机号
	 */
	@At("/telIsExist")
	@Ok("json:{locked:'password|salt'}")
	public Object telIsExist(@Param("tel")String tel){
		IUserService service = new UserService();
		return service.telIsExist(tel);
	}
	
	/*
	 * 判断图片验证码是否正确
	 * authcode 图片验证码
	 */
	@At("/AuthCodeIsRight")
	@Ok("json:{locked:'password|salt'}")
	public Object AuthCodeIsRight(@Param("tel")String tel, 
			@Param("authCode")String authCode){
		IUserService service = new UserService();
		return service.AuthCodeIsRight(tel, authCode);
	}
	/*
	 * 发送短信验证码
	 * 
	 */
	@At("/sendTelAuthCode")
	@Ok("json:{locked:'password|salt'}")
	public Object sendTelAuthCode(@Param("tel")String tel, @Param("authCode")String authCode){
//		IUserService service = new UserService();
//		return service.sendTelAuthCode(tel, authCode);
		map.put("msg", "发送成功");
		return map;
	}
	
	/*
	 * 判断短信验证码是否正确
	 * SmsCode 必 短信验证码
	 * authCode 必 图片验证码 
	 * 二次验证
	 */
	@At("/SmsCodeIsRight")
	@Ok("json:{locked:'password|salt'}")
	public Object SmsCodeIsRight(@Param("tel")String tel,
			@Param("authCode")String authCode, @Param("SmsCode")String SmsCode){
//		IUserService service = new UserService();
//		return service.SmsCodeIsRight(tel,  SmsCode, authCode);
		map.put("status", "0");
		return map;
	}
	
	/*
	 * 注册
	 */
	@At("/register")
	@Ok("json:{locked:'password|salt'}")
	public Object register(@Param("tel")String tel, @Param("authCode")String authCode,
			@Param("SmsCode")String telAuthCode,@Param("Eamil")String email, @Param("username")String username,
			@Param("password")String password, @Param("repassword")String rePassword){
		IUserService service = new UserService();
		return service.register(tel, username, email, authCode, telAuthCode, password, rePassword);
	}
	/*
	 * 登陆返回验证码打开返回验证码
	 * 正确返回图片验证码
	 * 错误返回json
	 */
	@At("/loginReturnAuthCode")
	@Ok("raw")
	public Object loginReturnAuthCode(@Param("tel")String tel, HttpServletRequest req, HttpServletResponse resp){
		IUserService service = new UserService();
		return service.loginReturnAuthCode(req, resp, tel);
	}
	
	/*
	 * 登陆
	 * 错误返回错误信息
	 * 正确返回用户信息
	 */
	@At("/login")
	@Ok("json:{locked:'password|salt'}")
	public Object login(@Param("tel")String tel, @Param("password")String password, 
			@Param("telAuthCode")String telAuthCode){
		IUserService service = new UserService();
		return service.login(tel, password, telAuthCode);
	}
	/*
	 * 上传头像
	 * toekn 权限验证
	 * userId 用户id
	 * header 头像文件
	 */
	@At("/uploadHeader")
	@Ok("json:{locked:'password|salt'}")
	public Object uploadHeader(@Param("userId")long userId,@Param("token")String token,@Param("userHead")String userHead){
		IUserService userService = new UserService();
		return userService.uploadHeader(token, userId, userHead);
	}
	/*
	 * 添加采购单
	 * 正确返回 添加采购单成功
	 * 失败返回失败信息
	 */
	@At("/issuePurchaseOrder")
	@Ok("json:{locked:'password|salt'}")
	public Object issuePurchaseOrder(
			@Param("token")String token,@Param("userId") long userId,
			@Param("orderTitle") String orderTitle, @Param("commodity")String commodity,
			@Param("endTime")Date endTime,@Param("purchaseType")int purchaseType,
			@Param("invoiceType")int invoiceType,@Param("sampleType") int sampleType,
			@Param("procurementArea")String procurementArea,@Param("additional") String additional,
			@Param("additionalFile")String additionalFile, @Param("linkman")String linkman,
			@Param("tel")String tel,@Param("fixedTel") String fixedTel,
			@Param("isPublic")int isPublic, @Param("distributioChannel")int distributioChannel,
			@Param("username")String username){
			try {
				IBuyerService  ib = new BuyerService();
				return ib.issuePurchaseOrder(token, userId, orderTitle, commodity, endTime, purchaseType, invoiceType, sampleType, procurementArea, additional, additionalFile, linkman, tel, fixedTel, isPublic, distributioChannel, username);
			} catch (Exception e) {
				e.printStackTrace();
				map.put("msg", "操作失败");
				return map;
			}
	}
	/*
	 * 添加报价单
	 */
	@At("/issueOfferOrder")
	@Ok("json:{locked:'password|salt'}")
	public Object issueOfferOrder(
			@Param("token")String token,@Param("userId") long userId,
			@Param("orderTitle") String orderTitle, @Param("commodity")String commodity,
			@Param("endTime")Date endTime,@Param("purchaseType")int purchaseType,
			@Param("invoiceType")int invoiceType,@Param("sampleType") int sampleType,
			@Param("procurementArea")String procurementArea,@Param("additional") String additional,
			@Param("additionalFile")String additionalFile, @Param("linkman")String linkman,
			@Param("tel")String tel,@Param("fixedTel") String fixedTel,
			@Param("isPublic")int isPublic, @Param("distributioChannel")int distributioChannel,
			@Param("username")String username){
			try {
				IBuyerService  ib = new BuyerService();
				return ib.issueOfferOrder(token, userId, orderTitle, commodity, endTime, purchaseType, invoiceType, sampleType, procurementArea, additional, additionalFile, linkman, tel, fixedTel, isPublic, distributioChannel, username);
			} catch (Exception e) {
				e.printStackTrace();
				map.put("msg", "操作失败");
				return map;
			}
	}
	/*
	 * 获取报价单列表(更正)
	 */
	@At("/getOffer_parentList")
	@Ok("json:{locked:'password|salt'}")
	public Object getOffer_parentList(@Param("userId")long userId,@Param("token")String token,
			@Param("pageNumber")int pageNumber, @Param("pageSize")int pageSize){
		IBuyerService buyerService = new BuyerService();
		return buyerService.getOffer_parentList(token, userId, pageNumber, pageSize);
	}
	/*
	 * 删除采购单
	 * token 必填 令牌
	 * userId 必填 用户id
	 * purchaseId 必填 采购单号
	 */
	@At("/deletePurchase")
	@Ok("json:{locked:'password|salt'}")
	public Object deletePurchase(@Param("userId")long userId,@Param("token")String token,@Param("purchaseId")long purchaseId){
		IBuyerService buyerService = new BuyerService();
		return buyerService.deletePurchase(token, userId, purchaseId);
	}
	/*
	 * 获取采购单列表
	 * userId 必填 用户id
	 * title 选填 标题
	 * status  审核状态  必填
	 * recommend 采购单状态
	 * offerTime 选 下拉框报价时间
	 * pageNumber 必填 页数
	 * pageSize 必填 每页数量
	 */
	@At("/getPurchaseList")
	@Ok("json:{locked:'password|salt'}")
	public Object getPurchaseList(@Param("userId")long userId,@Param("token")String token,
			@Param("status")int status,@Param("recommend")int recommend,@Param("title") String tilte, @Param("offerTime")int offerTime,
			@Param("pageNumber")int pageNumber,@Param("pageSize") int pageSize){
		try {
			IBuyerService buyerService = new BuyerService();
			return buyerService.getPurchaseList(token, userId, status,recommend, tilte, offerTime, pageNumber, pageSize);
		} catch (Exception e) {
			e.printStackTrace();
			map.put("msg", "操作失败");
			return map;
		}
		
	}
	/*
	 * 获取采购单详情
	 */
	@At("/getPurchasetest")
	@Ok("json:{locked:'password|salt'}")
	public Object getPurchasetest(@Param("userId")long userId,@Param("token")String token,@Param("purchaseId")long purchaseId){
		IBuyerService buyerService = new BuyerService();
		return buyerService.getPurchasetest(token, userId, purchaseId);
	}
	
	/*
	 * 找求购  搜索接口
	 * commodity_calling  所属行业
	 * purchase_area  采购区域
	 * purchase_time 发布时间
	 * purchase_endtime  截止时间
	 * purchase_type  采购类型
	 * desc  升序或降序
	 * keyword  关键字
	 * pageNumber  pageSize
	 */
	@At("/getSeachPurchase")
	@Ok("json:{locked:'password|salt'}")
	public Object getSeachPurchase(@Param("commodity_calling")String commodity_calling,
			@Param("purchase_area")String purchase_area,@Param("purchase_time")int purchase_time,
			@Param("desc")int desc,@Param("purchase_type")int purchase_type,
			@Param("keyword")String keyword,@Param("pageNumber")int pageNumber,
			@Param("pageSize")int pageSize){
		try {
			IBuyerService buyerService = new BuyerService();
			return buyerService.getSeachPurchase(commodity_calling, purchase_area, purchase_time, desc, purchase_type, keyword, pageNumber, pageSize);
		} catch (Exception e) {
			e.printStackTrace();
			map.put("msg", "操作失败");
			return map;
		}
		
	}
	/*
	 * 获取报价
	 * token 必填 令牌
	 * userId 必填 被报价人 用户id
	 * supplier 选填 供货商
	 * productKeyword 选填 产品关键字
	 * time 选填 时间类型
	 * pageNumber 必填 页数
	 * pageSize 必填 数量
	 * =========================
	 * 注意:被报价人有权限看到报价
	 */
	@At("/getOffer")
	@Ok("json:{locked:'password|salt'}")
	public Object getOffer(@Param("userId")long userId,@Param("token")String token,@Param("shopId")long shopId,
			@Param("productKeyword")String productKeyword,@Param("supplier") String supplier, @Param("offerTime")int offerTime,
			@Param("pageNumber")int pageNumber,@Param("pageSize") int pageSize){
		try {
			IBuyerService buyerService = new BuyerService();
			return buyerService.getOffer(token, userId,shopId, supplier, productKeyword, offerTime, pageNumber, pageSize);
		} catch (Exception e) {
			e.printStackTrace();
			map.put("msg", "操作失败");
			return map;
		}
		
	}
	/*
	 * 删除报价
	 * token 必填
	 * user_id 必填
	 * offerId 必填 报价单id
	 * ===========================
	 * 需要进行权限验证。
	 */
	@At("/deleteOffer")
	@Ok("json:{locked:'password|salt'}")
	public Object deleteOffer(@Param("userId")long userId,@Param("token")String token,@Param("offerId")long offerId){
		IBuyerService buyerService = new BuyerService();
		return buyerService.deleteOffer(token, userId, offerId);
	}
	/*
	 * 报价单管理
	 * 根据时间获取报价单
	 */
	@At("/getOfferByTime")
	@Ok("json:{locked:'password|salt'}")
	public Object getOfferByTime(@Param("userId")long userId,@Param("token")String token,@Param("shopId")long shopId,
			@Param("pageNumber")int pageNumber,@Param("pageSize") int pageSize){
		IBuyerService buyerService = new BuyerService();
		return buyerService.getOfferByTime(token, userId,shopId, pageNumber, pageSize);
	}
	/*
	 * 获取所有商品一级类目
	 * 返回查询信息,没有信息则为空
	 */
	@At("/getFirstCategory")
	@Ok("json:{locked:'password|salt'}")
	public Object getFirstCategory(){
		ICommonalityService commonalityService = new CommonalityService();
		return commonalityService.getFirstCategory();
	}
	/*
	 * 获取n级类目
	 * 返回查询信息,没有信息则为空
	 */
	@At("/getCategory")
	@Ok("json:{locked:'password|salt'}")
	public Object getCategory(@Param("fid")long fid,@Param("grade")int grade){
		ICommonalityService commonalityService = new CommonalityService();
		return commonalityService.getCategory(fid, grade);
	}
	/*
	 * 根据关键字获取类目及其所有父类目
	 * 返回查询信息,没有信息则为空
	 */
	@At("/selectCategory")
	@Ok("json:{locked:'password|salt'}")
	public Object selectCategory(@Param("keyword")String keyword){
		ICommonalityService commonalityService = new CommonalityService();
		return commonalityService.selectCategory(keyword);
	}
	/*
	 * 获取询价区间
	 */
	@At("/getInquiryTime")
	@Ok("json:{locked:'password|salt'}")
	public Object getInquiryTime(){
		IShopService iShopService = new ShopService();
		return iShopService.getInquiryTime();
	}
	/*
	 * 根据查询条件获取询价的数据
	 * 买家中心   询价信息
	 * 卖家中心   询价信息
	 * @param token
	 * @param userId
	 * @param type     买家中心:0   卖家中心:1
	 * @param shopId    
	 * @param commodity_name
	 * @param pageNumber
	 * @param pageSize
	 * @return
	 * @throws ParseException
	 */
	@At("/getEnquiry")
	@Ok("json:{locked:'password|salt'}")
	public Object getEnquiry(@Param("token")String token, @Param("userId")long userId, @Param("type")int type, @Param("shopId")long shopId, 
			@Param("commodity_name")String commodity_name,@Param("InquiryTime")int InquiryTime, @Param("pageNumber")int pageNumber, @Param("pageSize")int pageSize){
			IShopService iShopService = new ShopService();
			try {
				return iShopService.getEnquiry(token, userId, type, shopId, commodity_name, InquiryTime, pageNumber, pageSize);
			} catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException
					| ParseException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
				map.put("msg", "操作失败");
				map.put("status", "3");
				return map;
			}
	}
	/*
	 * 删除询价
	 */
	@At("/deleteEnquiry")
	@Ok("json:{locked:'password|salt'}")
	public Object deleteEnquiry(@Param("token")String token,@Param("userId")long userId,@Param("enquiryId") long enquiryId){
		IShopService iShopService = new ShopService();
		return iShopService.deleteEnquiry(token, userId, enquiryId);
	}
//	/*
//	 * 回复询价
//	 */
//	@At("/replyEnquiry")
//	@Ok("json:{locked:'password|salt'}")
//	public Object replyEnquiry(@Param("token")String token,@Param("userId")long userId,
//			@Param("replyMessage")String replyMessage,@Param("billId") long billId,
//			@Param("pageNumber")int pageNumber,@Param("pageSize") int pageSize){
//		IShopService iShopService = new ShopService();
//		try {
//			return iShopService.replyEnquiry(token, userId, replyMessage, billId, pageNumber, pageSize);
//		} catch (ParseException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//			map.put("msg", "操作失败");
//			return map;
//		}
//	}
	/*
	 * 添加询价   
	 * 回复询价
	 * @param token
	 * @param userId
	 * @param commodity_id			询价商品
	 * @param commodity_num		数量 
	 * @param enquiry_linkman		联系人
	 * @param enquiry_tel				联系电话 
	 * @param enquiry_type    		类型  0询价  1回复
	 * @param enquiry_quirer_id     对应的询价单ID值
	 * @param message                 详情
	 * @return
	 */
	@At("/addEnquiry")
	@Ok("json:{locked:'password|salt'}")
	public Object addEnquiry(@Param("token")String token,@Param("userId")long userId,@Param("commodity_id")long commodity_id,@Param("commodity_num")BigDecimal commodity_num,
			@Param("enquiry_linkman")String enquiry_linkman,@Param("enquiry_tel")String enquiry_tel,@Param("enquiry_type")int enquiry_type,
			@Param("enquiry_quirer_id")long enquiry_quirer_id,@Param("message")String message){
		try {
			IShopService iShopService = new ShopService();
			return iShopService.addEnquiry(token, userId, commodity_id, commodity_num, enquiry_linkman, enquiry_tel, enquiry_type, enquiry_quirer_id,message);
		} catch (Exception e) {
			e.printStackTrace();
			map.put("msg", "操作失败");
			return map;
		}
	}
	/*
	 * 发布产品
	 */
	@At("/ReleaseProduct")
	@Ok("json:{locked:'password|salt'}")
	public Object ReleaseProduct(@Param("token")String token,@Param("userId")long userId,
			@Param("category")String category){
		System.out.println(category+"main-----------------------------");
		IShopService iShopService = new ShopService();
		try {
			return iShopService.ReleaseProduct(token, userId, category);
		} catch (UnsupportedEncodingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			map.put("msg", "操作失败");
			return map;
		}
	}
	/*
	 * 修改产品
	 */
	@At("/updateCommdit")
	@Ok("json:{locked:'password|salt'}")
	public Object updateCommdit(@Param("token")String token,@Param("userId")long userId,
			@Param("category")String category){
		IShopService iShopService = new ShopService();
		try {
			return iShopService.updateCommdit(token, userId, category);
		} catch (UnsupportedEncodingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			map.put("msg", "操作失败");
			return map;
		}
	}
	/*
	 * 获取产品
	 * keyword 选填 关键字 
	 * commodityClass 选填 产品分类
	 * lowPrice 选填 低价	 -------|价格区间|
	 * hightPrice 选填 高价   ------------|
	 * shopId 必填 店铺id
	 * token 必填 权限
	 * userId 必填 用户id
	 * type 审核状态
	 * putaway 产品状态
	 * pageNumber 必填 页数
	 * pageSize 必填 每页条数
	 */
	@At("/getCommodity")
	@Ok("json:{locked:'password|salt'}")
	public Object getCommodity(@Param("keyword")String keyword, @Param("commodityClass")String commodityClass,
			@Param("lowPrice")BigDecimal lowPrice,@Param("hightPrice") BigDecimal hightPrice, 
			@Param("shopId")long shopId, @Param("token")String token, 
			@Param("type")int type,@Param("userId")long userId,@Param("putaway")int putaway,
			@Param("pageNumber")int pageNumber, @Param("pageSize")int pageSize){
		IShopService iShopService = new ShopService();
		return iShopService.getCommodity(keyword, commodityClass, lowPrice, hightPrice, shopId, token, type, userId,putaway, pageNumber, pageSize);
	}
	/*
	 * 获取单个产品详情
	 */
	@At("/getCommodityById")
	@Ok("json:{locked:'password|salt'}")
	public Object getCommodityById(@Param("commodityId")long commodityId){
		IShopService iShopService = new ShopService();
		return iShopService.getCommodityById( commodityId);
	}
	
	/*
	 * 删除产品
	 */
	@At("/deleteCommodity")
	@Ok("json:{locked:'password|salt'}")
	public Object deleteCommodity(@Param("token")String token,@Param("userId")long userId,
			@Param("commodityId")long commodityId){
		IShopService iShopService = new ShopService();
		return iShopService.deleteCommodity(userId, token, commodityId);
	}
	/*
	 * 修改产品状态
	 */
	@At("/updateCommodityStatus")
	@Ok("json:{locked:'password|salt'}")
	public Object updateCommodityStatus(@Param("token")String token,@Param("userId")long userId,
			@Param("accountClass")int accountClass,@Param("commodityId") long commodityId,@Param("status")int status){
		IShopService iShopService = new ShopService();
		return iShopService.updateCommodityStatus(userId, accountClass, token, commodityId, status);
	}
	
	/*
	 * 找供应  所搜接口
	 * commodity_name  关键字
	 *  commodity_deliveraddress   发货地
	 *  commodity_standard  商品规格
	 *  commodity_class  分类  例如:衣服/上衣/冲锋衣
	 * int  commodity_addtime  商品添加时间  排序
	 *  int price  价格 排序
	 *  int commodity_sales  销量 排序
	 *  commodity_deliverytime  发货期 int
	 *  company_model  经营模式  int
	 *  company_brand  品牌名称
	 *  lowPrice 选填 低价	 -------|价格区间|
	 * hightPrice 选填 高价
	 *  int pageNumber, int pageSize
	 */
	@At("/searchCommodity")
	@Ok("json:{locked:'password|salt'}")
	public Object searchCommodity(@Param("commodity_name")String commodity_name,
			@Param("commodity_deliveraddress")String commodity_deliveraddress,
			@Param("commodity_standard")String commodity_standard,
			@Param("commodity_class")String commodity_class,
			@Param("commodity_addtime")int commodity_addtime,
			@Param("price")int price,
			@Param("commodity_sales")int commodity_sales,
			@Param("commodity_deliverytime")int commodity_deliverytime,
			@Param("company_model")int company_model,
			@Param("company_brand")String company_brand,
			@Param("lowPrice") BigDecimal lowPrice,
			@Param("hightPrice") BigDecimal hightPrice,
			@Param("pageNumber")int pageNumber,
			@Param("pageSize")int pageSize){
		IShopService iShopService = new ShopService();
		return iShopService.searchCommodity(commodity_name, commodity_deliveraddress, commodity_standard, commodity_class, commodity_addtime, price, commodity_sales, commodity_deliverytime, company_model, company_brand, lowPrice, hightPrice, pageNumber, pageSize);
	}
	/*
	 * 获取订单列表
	 */
	@At("/getOrderList")
	@Ok("json:{locked:'password|salt'}")
	public Object getOrderList(@Param("userId")long userId,@Param("accountClass") int accountClass,
			@Param("token")String token, @Param("shopId")long shopId, @Param("buyerId")long buyerId,
			@Param("address_name")String address_name,
			@Param("orderId")long orderId, @Param("commoditKeyword")String commoditKeyword,
			@Param("buyerName")String buyerName,@Param("status") int status,@Param("type") int type, 
			@Param("payType")int payType, @Param("beginTime")Date beginTime, @Param("endTime")Date endTime){
		IShopService iShopService = new ShopService();
		return iShopService.getOrderList(userId, accountClass, token, shopId, buyerId,address_name, orderId, commoditKeyword, buyerName, status, type, payType, beginTime, endTime);
	}
	/*
	 * 添加订单或购物车
	 * @param userId
	 * @param token
	 * @param commodityies
	 * @param shop_id
	 * @param order_amount
	 * @param order_transaction
	 * @param order_paymenttime
	 * @param order_type
	 * @param addressId
	 * @return
	 */
	@At("/addOrder")
	@Ok("json:{locked:'password|salt'}")
	public Object addOrder(@Param("userId")long userId, @Param("token")String token, @Param("commodityies")String commodityies ,
			@Param("shop_id")long shop_id,@Param("order_transaction")BigDecimal order_transaction,
			@Param("order_paymenttime")Date order_paymenttime,@Param("order_type")int order_type,@Param("addressId")long addressId){
		IShopService shopService = new ShopService();
		try {
			return shopService.addOrder(userId, token, commodityies, shop_id, order_transaction, order_paymenttime, order_type, addressId);
		} catch (UnsupportedEncodingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			map.put("msg", "操作失败");
			return map;
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			map.put("msg", "操作失败");
			return map;
		}
	}
	/*
	 * 获取购物车或订单的数据
	 * @param user_id
	 * @param token
	 * @param order_status
	 * @param order_type
	 * @return
	 */
	@At("/getOrderForUser")
	@Ok("json:{locked:'password|salt'}")
	public Object getOrderForUser(@Param("user_id")long user_id, @Param("token")String token,@Param("order_status")int order_status,
			@Param("order_type")int order_type){
		IShopService shopService = new ShopService();
		return shopService.getOrderForUser(user_id, token, order_status, order_type);
	}
	/*
	 * 删除订单
	 */
	@At("/deleteOrder")
	@Ok("json:{locked:'password|salt'}")
	public Object deleteOrder(@Param("userId")long userId,@Param("token")String token,@Param("orderId")long orderId,
			@Param("oder_detail_id")long oder_detail_id){
		IShopService shopService = new ShopService();
		return shopService.deleteOrder(userId, token, orderId,oder_detail_id);
	}
	/*
	 * 修改订单的数量或将购物车内的商品转为订单
	 * @param user_id
	 * @param token
	 * @param order_detail_id
	 * @param commodity_num
	 * @param commodity_money
	 * @param order_status
	 * @param order_type
	 * @param order_addreass_id
	 * @param pay_type
	 * @return
	 */
	@At("/updateOrder")
	@Ok("json:{locked:'password|salt'}")
	public Object updateOrder(@Param("userId")long user_id, @Param("token")String token,@Param("order_detail_id")long order_detail_id,
			@Param("commodity_num")BigDecimal commodity_num,@Param("commodity_money")BigDecimal commodity_money,@Param("order_status")int order_status,
			@Param("order_type")int order_type,@Param("order_addreass_id")long order_addreass_id,@Param("pay_type")int pay_type){
		IShopService shopService = new ShopService();
		return shopService.updateOrder(user_id, token, order_detail_id, commodity_num, commodity_money, order_status, order_type, order_addreass_id,pay_type);
	}
	/*
	 * 修改订单款项确认
	 * @param userid
	 * @param token
	 * @param pay_id
	 * @param type 判断是买家还是卖家  买家0  卖家1
	 * @return
	 */
	@At("/updateShop_pay")
	@Ok("json:{locked:'password|salt'}")
	public Object updateShop_pay(@Param("userid")long userid,@Param("token")String token,@Param("pay_id")long pay_id,@Param("type")int type){
		IShopService shopService = new ShopService();
		try {
			return shopService.updateShop_pay(userid, token, pay_id, type);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			map.put("msg", "操作失败");
			return map;
		}
	}
	/*
	 *  修改订单状态
	 *  买家确认收货  参数  shop_order_status:4
	 * @param userid
	 * @param token
	 * @param shop_order_id
	 * @param shop_order_status   
	 * @return
	 */
	@At("/updateShop_order")
	@Ok("json:{locked:'password|salt'}")
	public Object updateShop_order(@Param("userid")long userid,@Param("token")String token,
			@Param("shop_order_id")long shop_order_id,@Param("shop_order_status")int shop_order_status){
		IShopService shopService = new ShopService();
		return shopService.updateShop_order(userid, token, shop_order_id, shop_order_status);
	}
	/*
	 * 获取数据根据查询条件
	 * 买家中心获取评价   type:0   
	 * 卖家中心获取评价	type:1
	 * @param userid  用户ID  卖家中心
	 * @param token
	 * @param shop_id 店铺ID  卖家中心
	 * @param type   0:买家   1卖家
	 * @param appraise_grade  查询条件 等级
	 * @param pageNumber
	 * @param pageSize
	 * @return
	 */
	@At("/getShop_commodity_appraiseForSearch")
	@Ok("json:{locked:'password|salt'}")
	public Object getShop_commodity_appraiseForSearch(@Param("userid")long userid,@Param("token")String token,@Param("shop_id")long shop_id,@Param("type")int type,
			@Param("appraise_grade")int appraise_grade, @Param("pageNumber")int pageNumber ,@Param("pageSize")int pageSize){
		IShopService shopService = new ShopService();
		return shopService.getShop_commodity_appraiseForSearch(userid, token, shop_id, type, appraise_grade, pageNumber, pageSize);
	}
	/*
	 * 添加评价
	 */
	@At("/addComment")
	@Ok("json:{locked:'password|salt'}")
	public Object addComment(@Param("order_id")long order_id, @Param("user_id")long user_id,
			@Param("token")String token, @Param("appraise_grade")int appraise_grade,
			@Param("appraise_value")String appraise_value){
		IShopService iShopService = new ShopService();
		return iShopService.addComment(order_id, user_id, token, appraise_grade, appraise_value);
	}
//	/*
//	 * 询盘信息
//	 * token 必填 令牌
//	 * userId 必填 用户id
//	 * CommodityKeyword 选填 询盘产品
//	 * time 必填 询盘时间周期下拉框
//	 */
//	@At("/getInquiryList")
//	@Ok("json:{locked:'password|salt'}")
//	public Object getInquiryList( @Param("userId")long userId,@Param("token")String token, @Param("time")int time,
//			@Param("Commoditykeyword")String Commoditykeyword,
//			@Param("pageNumber")int pageNumber,@Param("pageSize")int pageSize){
//		try {
//			IBuyerService buyerService = new BuyerService();
//			return buyerService.getInquiryList(token, userId, Commoditykeyword, time, pageNumber, pageSize);
//		} catch (Exception e) {
//			e.printStackTrace();
//			map.put("msg", "操作失败");
//			return map;
//		}
//	}
	/*
	 * 获取询盘消息
	 * 询盘内容
	 * token 必填 令牌
	 * userId 必填 用户id
	 * enquiryId 必填 询价单id
	 */
	@At("/getInquiryText")
	@Ok("json:{locked:'password|salt'}")
	public Object getInquiryText( @Param("userId")long userId,@Param("token")String token, @Param("offerId")long offerId){
			IBuyerService buyerService = new BuyerService();
			return buyerService.getInquiryText(token, userId, offerId);
	}
	/*
	 * 发表报价回复
	 * token 必填 令牌
	 * userId 必填 用户id
	 * enquiryId 必填 询价单id
	 * text 必填 发布内容
	 */
	@At("/sendInquiryText")
	@Ok("json:{locked:'password|salt'}")
	public Object sendInquiryText( @Param("userId")long userId,@Param("token")String token,
			@Param("offerId")long offerId,@Param("text")String text){
			IBuyerService buyerService = new BuyerService();
			return buyerService.sendInquiryText(token, userId, offerId, text);
	}
	/*
	 * 上传图片
	 * 成功返回图片地址
	 * 失败返回失败信息
	 */
//	@POST
//	@At("/uploadImg")
//    @Ok("raw")
//    @AdaptBy(type = UploadAdaptor.class, args = {"${app.root}/WEB-INF/tmp/upload"})
//    public String uploadImg(@Param("file") TempFile[] file) {
//		Mvcs.disableFastClassInvoker=true;
//		String name="";
//		for(TempFile fil:file){
//			String str = fil.getSubmittedFileName().split("\\.")[1];
//	        String filename = UUID.randomUUID() + "." + str;
////	        String path = "/Applications/apache-tomcat-8.0.41/webapps/ROOT/upload/";
//	        String path= Mvcs.getServletContext().getRealPath("/");
//	        System.out.println("pa:"+path);
//	        String newfileName = path+"img\\" + filename;
//	        try {
//	        	fil.write(newfileName);
//	        	name=filename+",";
//	        } catch (IOException e) {
//	            e.printStackTrace();
//	        }
//		}
//		System.out.println("--:"+name);
//        return name;
//    }
	
	
	
//	@POST
//	@At("/uploadImg")
//	@Ok("json:{locked:'password|salt'}")
//	@AdaptBy(type = UploadAdaptor.class, args={ "${app.root}/WEB-INF/tmp" })
//	public Object uploadImg(@Param("file")TempFile[] file,@Param("token")String token,@Param("userId")long userId){
////		if(!IsToken.isToken(token, userId)){
////			if(IsToken.isAdminToken(userId, token)){
////				map.put("msg", "身份过期");
////				return map;
////			}
////		}
//		System.out.println("--:"+file);
//		
//		Map<String, String> map = new HashMap<String, String>();
//		String msg =null;
//		try {
//			for (TempFile tempFile : file) {
//				msg = UploadImg.upload(tempFile);
//				map.put(tempFile.getSubmittedFileName(), msg); 
//			}
//		} catch (Exception e) {
//			e.printStackTrace();
//		} 
//		return map;
//	}
	/*
	 * 根据用户id判断是否有店铺
	 * @param user_id
	 * @param token
	 * @return
	 */
	@At("/getShop_IdForUser")
	@Ok("json:{locked:'password|salt'}")
	public Object getShop_IdForUser(@Param("user_id")long user_id,@Param("token")String token){
		IUserService userService=new UserService();
		return userService.getShop_Id(token, user_id);
	}
	/*
	 * 提交公司信息
	 * 
	 */
	@At("/uploadCommpanyInformation")
	@Ok("json:{locked:'password|salt'}")
	public Object uploadCommpanyInformation(@Param("userId")long userId,@Param("token")String token,
			@Param("companyTest")String companyTest,@Param("shop")String shop,
			@Param("shop_contact")String shop_contact,@Param("shop_supply")String shop_supply){
		try {
			ICompanyService companyService = new CompanyService();
			return companyService.uploadCommpanyInformation(userId,token,companyTest,shop,shop_contact,shop_supply);
		} catch (Exception e) {
			e.printStackTrace();
			map.put("msg", "操作失败");
			return map;
		}
	}
	/*
	 * 获取公司信息
	 */
	@At("/getCompanyInformation")
	@Ok("json:{locked:'password|salt'}")
	public Object getCompanyInformation(@Param("shopId")long shopId){
		ICompanyService companyService = new CompanyService();
		return companyService.getCompanyInformation(shopId);
	}
	
	/*
	 * 修改公司信息
	 * @param userId
	 * @param token
	 * @param companyTest
	 * @param shop
	 * @param shop_contact
	 * @param shop_supply
	 * @return
	 */
	@At("/updateCompanyInformation")
	@Ok("json:{locked:'password|salt'}")
//	@Param("company_name")String company_name,@Param("company_model") int company_model,
//	@Param("company_trade")int company_trade, @Param("company_Email")String company_Email, 
//	@Param("contact_person")String contact_person,@Param("contact_way") String contact_way, 
//	@Param("contact_address")String contact_address,@Param("supply_product")String supply_product,
//	@Param("supply_calling") String supply_calling
	public Object updateCompanyInformation(@Param("userId")long userId, @Param("token")String token,
			@Param("companyTest")String companyTest,@Param("shop")String shop,@Param("shop_contact")String shop_contact,
			@Param("shop_supply")String shop_supply){
		ICompanyService companyService = new CompanyService();
		try {
			return companyService.updateCompanyInformation(userId, token, companyTest, shop, shop_contact, shop_supply);
		} catch (UnsupportedEncodingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			map.put("msg", "操作失败");
			return map;
		}
				
	}
	/*
	 * 找公司  搜索接口
	 * company_name  公司名
	 * shop_commend  是否推荐
	 * company_type   企业类型
	 * company_model  经营模式  int
	 * company_brand  品牌名称
	 * supply_product  主要供应产品
	 * supply_calling  主要涉及行业
	 * supply_area  主要面向地区
	 *  pageNumber,  pageSize
	 */
	@At("/getSeachCompany")
	@Ok("json:{locked:'password|salt'}")
	public Object getSeachCompany(@Param("company_name")String company_name,@Param("shop_commend")int shop_commend,
			@Param("company_type")String company_type,@Param("company_model")int company_model,
			@Param("company_brand")String company_brand,@Param("supply_product")String supply_product,
			@Param("supply_calling")String supply_calling,@Param("supply_area")String supply_area,
			@Param("pageNumber")int pageNumber,@Param("pageSize") int pageSize){
		ICompanyService companyService = new CompanyService();
		return companyService.getSeachCompany(company_name, shop_commend, company_type, company_model, company_brand, supply_product, supply_calling, supply_area, pageNumber, pageSize);
	}
	/*
	 * 获取退货信息
	 * orderId 选填 订单号
	 * returnWaybillNumber 选填 退货运单号
	 * status 选填 退款/退货状态
	 * begin end time 开始结束时间 
	 */
	@At("/getReManagement")
	@Ok("json:{locked:'password|salt'}")
	public Object getReManagement(@Param("userId")long userId,@Param("token")String token,
			@Param("orderId")long orderId, @Param("returnWaybillNumber")long returnWaybillNumber, 
			@Param("status")int status, @Param("beginTime")Date beginTime,@Param("endTime") Date endTime){
		IShopService shopService = new ShopService();
		return shopService.getReManagement(orderId, returnWaybillNumber, status, beginTime, endTime, userId, token);
		
	}
	/*
	 * 管理员登录
	 * @param admin_name
	 * @param admin_password
	 * @return
	 */
//	@At("/adminlogin")
//	@Ok("json:{locked:'password|salt'}")
//	public Object adminlogin(@Param("admin_name")long admin_name,@Param("admin_password")String admin_password){
//		IAdminService adminService=new AdminService();
//		return adminService.adminlogin(admin_name, admin_password);
//	}
	/**
	 * 获取会展信息数据
	 * @param conference_address
	 * @param timestatus
	 * @param pageNumber
	 * @param pageSize
	 * @return
	 */
	@At("/getConference")
	@Ok("json:{locked:'password|salt'}")
	public Object getConference(@Param("conference_address")String conference_address,@Param("timestatus")String timestatus,
			@Param("pageNumber")int pageNumber,@Param("pageSize")int pageSize){
		IConferenceService conferenceService =new ConferenceService();
		return conferenceService.getConference(conference_address, timestatus, pageNumber, pageSize);
	}
	/**
	 * 获取展会信息对应的参与展会信息
	 * @param admin_token
	 * @param conference_id
	 * @return
	 */
	@At("/getConferenceparticipant")
	@Ok("json:{locked:'password|salt'}")
	public Object getConferenceparticipant(@Param("conference_id")long conference_id,
			@Param("pageNumber")int pageNumber,@Param("pageSize")int pageSize){
		IConferenceService conferenceService =new ConferenceService();
		return conferenceService.getConferenceparticipant(conference_id, pageNumber, pageSize);
	}
	/*
	 * 获取一条展会详情
	 */
	@At("/getConferenceById")
	@Ok("json:{locked:'password|salt'}")
	public Object getConferenceById(@Param("conference_id")long conference_id){
		IConferenceService conferenceService =new ConferenceService();
		return conferenceService.getConferenceById(conference_id);
	}
	/**
	 * 添加展会信息数据
	 * @param conference_title
	 * @param conference_time
	 * @param conference_address
	 * @param conference_commoditynum
	 * @param conference_hot
	 * @param conference_synopsis
	 * @param conference_way
	 * @param user_id
	 * @return
	 */
	@At("/addConference")
	@Ok("json:{locked:'password|salt'}")
	public Object addConference(@Param("adminId")long adminId,@Param("admin_token")String admin_token,@Param("conference_title")String conference_title,
			@Param("conference_time")String conference_time,@Param("conference_address")String conference_address,
			@Param("conference_commoditynum")int conference_commoditynum,@Param("conference_hot")int conference_hot,
			@Param("conference_synopsis")String conference_synopsis,@Param("conference_way")String conference_way,
			@Param("user_id")long user_id){
		IConferenceService conferenceService =new ConferenceService();
		try {
			return conferenceService.addConference(adminId,admin_token, conference_title, conference_time, conference_address, conference_commoditynum, conference_hot, conference_synopsis, conference_way, user_id);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			map.put("msg", "操作失败");
			return map;
		}
	}
	/*
	 * 根据发布时间获取新闻列表
	 */
	@At("/getNewsList")
	@Ok("json:{locked:'password|salt'}")
	public Object getNewsList(@Param("pageNumber")int pageNumber,@Param("pageSize")int pageSize){
		INewsService newsService = new NewsService();
		return newsService.getNewsList(pageNumber, pageSize);
	}
	/*
	 * 获取推荐新闻列表
	 */
	@At("/getNewsCommendList")
	@Ok("json:{locked:'password|salt'}")
	public Object getNewsCommendList(){
		INewsService newsService = new NewsService();
		return newsService.getNewsCommendList();
	}
	/*
	 * 获取一条新闻详情
	 */
	@At("/getNewsById")
	@Ok("json:{locked:'password|salt'}")
	public Object getNewsById(@Param("newsId")long newsId){
		INewsService newsService = new NewsService();
		return newsService.getNewsById(newsId);
	}
	/**
	 * 发送新闻
	 * @param adminId  即作为验证token使用,又是表结构中的必填字段
	 * @param token	
	 * @param title		新闻标题
	 * @param time		发布时间
	 * @param text		发布内容
	 * @param headerImg	标题图片
	 * @param newsClass	新闻类别
	 * @return  是否成功
	 */
	@At("/sendNews")
	@POST
	@Ok("json:{locked:'password|salt'}")
	public Object sendNews(@Param("adminId")long adminId, @Param("token")String token,
			@Param("title")String title,@Param("time")Date time, 
			@Param("text")String text, @Param("headerImg")String headerImg, @Param("newsClass")int newsClass){
		INewsService newsService = new NewsService();
		return newsService.sendNews(adminId, token, title, time, text, headerImg, newsClass);
	}
	
	/*
	 * 管理员登陆
	 * id 管理员id
	 * password 管理员密码
	 */
	@At("/adminLogin")
	@Ok("json:{locked:'password|salt'}")
	public Object adminLogin(@Param("id")long adminId,
			@Param("password")String adminPassword){
		IAdminService service = new AdminService();
		return service.adminlogin(adminId, adminPassword);
	}
	/*
	 * 获取供求消息
	 * admin 管理员
	 * token 令牌
	 * type 0表示供应商品,1表示求购信息
	 * status 状态 0为未审核,1为已审核,2审核未通过
	 * username 发布人 选填
	 */
	@At("/getSupplyAndDemand")
	@Ok("json:{locked:'password|salt'}")
	public Object getSupplyAndDemand(@Param("adminId")long adminId,
			@Param("admin_token")String admin_token,
			@Param("type")int type,
			@Param("status")int status,
			@Param("pageNumber")int pageNumber,
			@Param("pageSize")int pageSize,
			@Param("adminTime")int adminTime,
			@Param("username")String username){
		try {
			IShopService shopService = new ShopService();
			return shopService.getSupplyAndDemand(adminId, admin_token, type, status,pageNumber, pageSize, adminTime,username);
		} catch (Exception e) {
			e.printStackTrace();
			map.put("msg", "操作失败");
			return map;
		}
		
	}
	/*
	 * 审核供求信息
	 * admin 管理员
	 * token 令牌
	 * id 供求消息id
	 * type 0表示供应商品,1表示求购信息
	 * cause  原因
	 * result 审核结果
	 */
	@At("/examineSupplyAndDemand")
	@Ok("json:{locked:'password|salt'}")
	public Object examineSupplyAndDemand(@Param("adminId")long adminId,
			@Param("admin_token")String admin_token,
			@Param("id")long id,
			@Param("type")int type,
			@Param("cause")String cause,
			@Param("result")int result){
		IShopService shopService = new ShopService();
		return shopService.examineSupplyAndDemand(adminId, admin_token,
				id, type, cause,result);
	}
	/*
	 * 获取用户列表---管理员
	 * admin 管理员id
	 * token 令牌
	 * int userStauts 用户状态 -1表示获取全部,0为未审核,1为已审核,2为封号
	 * pageNumber 
	 * pageSize
	 */
	@At("/getUserList")
	@Ok("json:{locked:'password|salt'}")
	public Object getUserList(
			@Param("adminId")long adminId,@Param("admin_token")String admin_token, 
			@Param("userStauts")int stauts, 
			@Param("pageNumber")int pageNumber,
			@Param("pageSize")int pageSize){
		IUserService server = new UserService();
		return server.getUserList(adminId, admin_token, stauts, pageNumber, pageSize);
	}
	
	/*
	 * 审核用户
	 * userId 用户id
	 * status 修改的状态 用户状态 1为未审核,2为已审核,3为审核未通过
	 * cause 原因
	 */
	@At("/examineUser")
	@Ok("json:{locked:'password|salt'}")
	public Object examineUser(
			@Param("adminId")long adminId,
			@Param("admin_token")String admin_token, 
			@Param("userId")long userId,
			@Param("status")int status,
			@Param("cause")String cause){
		IUserService server = new UserService();
		return server.examineUser(adminId, admin_token, userId, status,cause);
	}
	
	/**
	 * 获取用户的默认收货地址
	 * @param userId		用户id
	 * @param token     用户令牌
	 * @return		返回用户默认收货地址json数组
	 */
	@At("/getAcquiesceAddress")
	@Ok("json:{locked:'password|salt'}")
	public Object getAcquiesceAddress(@Param("userId")long userId, @Param("token")String token){
		IAddressService service = new AddressService();
		return service.getAcquiesceAddress(userId, token);
	}
	
	/**
	 * 获取用户的收货地址列表
	 * @param userId 用户id
	 * @param token  用户令牌
	 * @return		返回用户的收货地址列表json数组	
	 */
	@At("/getAddressListById")
	@Ok("json:{locked:'password|salt'}")
	public Object getAddressListById(@Param("userId")long userId, @Param("token")String token){
		IAddressService service = new AddressService();
		return service.getAddressListById(userId, token);
	}
	
	
	/**
	 * 添加收货地址
	 * @param userId   用户id
	 * @param token
	 * @param addressTitle  标题
	 * @param addressName  收货人
	 * @param tel   手机号
	 * @param country   国家
	 * @param province  省
	 * @param city    市
	 * @param address_postalcode 邮政编码
	 * @param area    地区
	 * @param street  街道 
	 * @param particular  详细地址
	 * @param address_landline 固话
	 * @return 添加成功/失败
	 */
	@At("/addAddressById")
	@Ok("json:{locked:'password|salt'}")
	public Object addAddressById(@Param("userId")long userId, @Param("token")String token, @Param("addressTitle")String addressTitle,
			@Param("addressName")String addressName, @Param("tel")String tel, @Param("country")int country,@Param("address_postalcode")String address_postalcode, 
			@Param("province")int province,@Param("city")int city, @Param("area")int area, @Param("street")String street,
			@Param("particular")String particular,@Param("address_landline")String address_landline){
		IAddressService service = new AddressService();
		return service.addAddressById(userId, token,addressTitle,addressName,tel,country,address_postalcode,province,city,area,street,particular,address_landline);
	}
	
	/**
	 * 删除收货地址
	 */
	@At("/deleteAddress")
	@Ok("json:{locked:'password|salt'}")
	public Object deleteAddress(@Param("userId")long userId, @Param("token")String token,@Param("adressId")long adressId){
		IAddressService service = new AddressService();
		return service.deleteAddress(userId, token, adressId);
	}
	/*
	 * 设置默认的收货地址
	 * @param userId
	 * @param token
	 * @param addressId
	 * @return
	 */
	@At("/updateAddressFordefult")
	@Ok("json:{locked:'password|salt'}")
	public Object updateAddressFordefult(@Param("userId")long userId, @Param("token")String token,@Param("addressId")long addressId){
		IAddressService service = new AddressService();
		return service.updateAddressFordefult(userId, token, addressId);
	}
	/**
	 * 修改用户密码
	 * @param user_id
	 * @param token
	 * @param password
	 * @return
	 */
	@At("/updateUserForPassword")
	@Ok("json:{locked:'password|salt'}")
	public Object updateUserForPassword(@Param("user_id")long user_id, @Param("token")String token,
			@Param("password")String password,@Param("oldpassword")String oldpassword){
		IUserService userService=new UserService();
		return userService.updateUserForPassword(user_id, token, password,oldpassword);
	}
	/**
	 * 修改采购单信息
	 * @param token
	 * @param userId
	 * @param purchase_id
	 * @param orderTitle
	 * @param commodity
	 * @param endTime
	 * @param purchaseType
	 * @param invoiceType
	 * @param sampleType
	 * @param procurementArea
	 * @param additional
	 * @param additionalFile
	 * @param linkman
	 * @param tel
	 * @param fixedTel
	 * @param isPublic
	 * @param distributioChannel
	 * @param username
	 * @return
	 */
	@At("/updatePurchase")
	@Ok("json:{locked:'password|salt'}")
	public Object updatePurchase(@Param("token")String token,@Param("userId") long userId,@Param("purchase_id")long purchase_id,
			@Param("orderTitle") String orderTitle, @Param("commodity")String commodity,
			@Param("endTime")Date endTime,@Param("purchaseType")int purchaseType,
			@Param("invoiceType")int invoiceType,@Param("sampleType") int sampleType,
			@Param("procurementArea")String procurementArea,@Param("additional") String additional,
			@Param("additionalFile")String additionalFile, @Param("linkman")String linkman,
			@Param("tel")String tel,@Param("fixedTel") String fixedTel,
			@Param("isPublic")int isPublic, @Param("distributioChannel")int distributioChannel,
			@Param("username")String username){
		IBuyerService buyerService=new BuyerService();
		
		try {
			return buyerService.updatePurchase(token, userId, purchase_id, orderTitle,
					commodity, endTime, purchaseType, invoiceType, sampleType, procurementArea, additional, additionalFile, linkman, tel, fixedTel, isPublic, distributioChannel, username);
		} catch (UnsupportedEncodingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			map.put("msg", "操作失败");
			return map;
		}
	}
	/*
	 * 修改采购单的状态
	 * @param token
	 * @param userId
	 * @param purchase_recommend
	 * @return
	 */
	@At("/updatePurchaseForrecommend")
	@Ok("json:{locked:'password|salt'}")
	public Object updatePurchaseForrecommend(@Param("token")String token, @Param("userId")long userId,@Param("purchase_id")int purchase_id,@Param("purchase_recommend")int purchase_recommend){
		IBuyerService buyerService=new BuyerService();
		return buyerService.updatePurchaseForrecommend(token, userId, purchase_id, purchase_recommend);
	}
	/*
	 * 获取会展信息数据
	 * @param title
	 * @param conference_status
	 * @param pageNumber
	 * @param pageSize
	 * @return
	 */
	@At("/getConferencelist")
	@Ok("json:{locked:'password|salt'}")
	public Object getConferencelist(@Param("title")String title,@Param("conference_status")int conference_status,@Param("pageNumber")int pageNumber,@Param("pageSize")int pageSize){
		IConferenceService conferenceService =new ConferenceService();
		return conferenceService.getConferenceFortitle(title,conference_status, pageNumber, pageSize);
	}
	/**
	 * 获取政策信息数据
	 * @param title
	 * @param pageNumber
	 * @param pageSize
	 * @return
	 */
	@At("/getNewsForTitle")
	@Ok("json:{locked:'password|salt'}")
	public Object getNewsForTitle(@Param("title")String title,@Param("pageNumber")int pageNumber,@Param("pageSize")int pageSize){
		INewsService newsService=new NewsService();
		return newsService.getNewsForTitle(title, pageNumber, pageSize);
	}

	/*
	 * 修改收货地址
	 * @param userId   用户id
	 * @param token
	 * @param addressId 收货地址id
	 * @param addressTitle  标题
	 * @param addressName  收货人
	 * @param tel   手机号
	 * @param address_postalcode 邮政编码
	 * @param particular  详细地址
	 * @param address_landline 电话
	 * @return 成功/失败
	 */
	@At("/updateAddressById")
	@Ok("json:{locked:'password|salt'}")
	public Object updateAddressById(@Param("userId")long userId, @Param("token")String token, @Param("addressId")long addressId, @Param("addressTitle")String addressTitle, @Param("addressName")String addressName, @Param("tel")String tel,
			@Param("address_postalcode")String address_postalcode, @Param("particular")String particular, @Param("address_landline")String address_landline){
		IAddressService server = new AddressService();
		return server.updateAddressById(userId, token, addressId, addressTitle, addressName, tel, address_postalcode, particular, address_landline);
		
	}
	/*
	 * 获取收货地址
	 * long userId,
	 * String token,
	 * long addressId
	 */
	@At("/getAddressById")
	@Ok("json:{locked:'password|salt'}")
	public Object getAddressById(@Param("userId")long userId, @Param("token")String token,@Param("addressId") long addressId){
		IAddressService server = new AddressService();
		return server.getAddressById(userId, token, addressId);
	}
	/*
	 * 修改管理员的密码
	 * @param adminId
	 * @param token
	 * @param oldpassword
	 * @param password
	 * @return
	 */
	@At("/updateAdmin")
	@Ok("json:{locked:'password|salt'}")
	public Object updateAdmin(@Param("adminId")long adminId, @Param("token")String token,@Param("oldpassword")String oldpassword, 
			@Param("password")String password){
		IAdminService adminService =new AdminService();
		return adminService.updateAdmin(adminId, token, oldpassword, password);
	}
	/**
	 * 翻译接口
	 */
	@At("/fanyi")
	@Ok("json:{locked:'password|salt'}")
	public Object fanyi(@Param("array")List<String> array){
		Translate t = new Translate();
		return t.TxTranslate(array);
	}
	
	
	
	/**
	 * 删除用户操作
	 * @param admin  管理员id
	 * @param token 管理员token
	 * @param userId 用户id
	 * @return 操作结果!
	 */
	@At("/deleteUser")
	@Ok("json:{locked:'password|salt'}")
	public Object deleteUser(@Param("admin")long admin, @Param("token")String token, @Param("userId")long userId){
		IUserService server = new UserService();
		return server.deleteUser(admin, token, userId);
	}
	/**
	 * 找公司
	 * @param pageNumber
	 * @param pageSize
	 * @return
	 */
	@At("/getSearchCompanyAndCommodity")
	@Ok("json:{locked:'password|salt'}")
	public Object getSearchCompanyAndCommodity(@Param("pageNumber")int pageNumber,@Param("pageSize")int pageSize){
		ICompanyService companyService=new CompanyService();
		return companyService.getSearchCompanyAndCommodity(pageNumber, pageSize);
	}
	/**
	 * 修改新闻
	 * @param adminId
	 * @param token
	 * @param newsId
	 * @param title
	 * @param text
	 * @param headerImg
	 * @param status
	 * @return
	 */
	@At("/updateNews")
	@POST
	@Ok("json:{locked:'password|salt'}")
	public Object updateNews(@Param("adminId")long adminId, @Param("token")String token,@Param("newsId")long newsId,
			@Param("title")String title,@Param("text")String text,@Param("headerImg")String headerImg,@Param("status")int status){
		INewsService newsService=new NewsService();
		return newsService.updateNews(adminId, token, newsId, title, text, headerImg, status);
	}
	/**
	 * 删除新闻
	 * @param adminId
	 * @param token
	 * @param newsId
	 * @return
	 */
	@At("/deleteNews")
	@Ok("json:{locked:'password|salt'}")
	public Object deleteNews(@Param("adminId")long adminId, @Param("token")String token,@Param("newsId")long newsId){
		INewsService newsService=new NewsService();
		return newsService.deleteNews(adminId, token, newsId);
	}
	/**
	 * 修改会展信息数据
	 * @param adminId
	 * @param admin_token
	 * @param conference_id
	 * @param conference_title
	 * @param conference_time
	 * @param conference_address
	 * @param conference_commoditynum
	 * @param conference_hot
	 * @param conference_synopsis
	 * @param conference_way
	 * @param conference_commend
	 * @return
	 */
	@At("/updateConference")
	@Ok("json:{locked:'password|salt'}")
	public Object updateConference(@Param("adminId")long adminId,@Param("admin_token")String admin_token,@Param("conference_id")long conference_id,
			@Param("conference_title")String conference_title,@Param("conference_time")String conference_time,@Param("conference_address")String conference_address,
			@Param("conference_commoditynum")int conference_commoditynum,@Param("conference_hot")int conference_hot,@Param("conference_synopsis")String conference_synopsis,
			@Param("conference_way")String conference_way,@Param("conference_commend")int conference_commend){
		IConferenceService conferenceService=new ConferenceService();
		return conferenceService.updateConference(adminId, admin_token, conference_id, conference_title, conference_time, conference_address, 
				conference_commoditynum, conference_hot, conference_synopsis, conference_way, conference_commend);
	}
	/**
	 * 删除会展信息
	 * @param adminId
	 * @param admin_token
	 * @param conference_id
	 * @return
	 */
	@At("/deleteCongference")
	@Ok("json:{locked:'password|salt'}")
	public Object deleteCongference(@Param("adminId")long adminId, @Param("admin_token")String admin_token,@Param("conference_id")long conference_id){
		IConferenceService conferenceService=new ConferenceService();
		return conferenceService.deleteCongference(adminId, admin_token, conference_id);
	}
	/*
	 * 获取推荐的会展信息
	 * @return
	 */
	@At("/getConferenceForStatus")
	@Ok("json:{locked:'password|salt'}")
	public Object getConferenceForStatus(){
		IConferenceService conferenceService=new ConferenceService();
		return conferenceService.getConferenceForStatus();
	}
	/*
	 * 获取推荐商品/采购单
	 */
	@At("/getRecommend")
	@Ok("json:{locked:'password|salt'}")
	public Object getRecommend(@Param("type")int type, @Param("area")int area){
		IOs_recommendService os_recommendService = new Os_recommendService();
		return os_recommendService.getRecommend(type, area);
	}
	/*
	 * 后台管理获取推荐审核列表
	 */
	@At("/getRecommendList")
	@Ok("json:{locked:'password|salt'}")
	public Object getRecommendList(@Param("adminId")long adminId,@Param("adminToken")String adminToken, 
			@Param("type")int type, @Param("area")int area){
		IOs_recommendService os_recommendService = new Os_recommendService();
		try {
			return os_recommendService.getRecommendList(adminId,adminToken,type, area);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			map.put("msg", "申请操作失败");
			return map;
		}
	}
	/*
	 * 后台管理获取预置详情
	 */
	@At("/getYzlist")
	@Ok("json:{locked:'password|salt'}")
	public Object getYzlist(@Param("adminId")long adminId,@Param("adminToken")String adminToken, 
			@Param("type")int type, @Param("area")int area,@Param("order")int order){
		IOs_recommendService os_recommendService = new Os_recommendService();
		return os_recommendService.getYzlist(adminId, adminToken, type, area, order);
	}
	/*
	 * 推荐审核添加预置对象
	 */
	@At("/addRecommend")
	@Ok("json:{locked:'password|salt'}")
	public Object addRecommend(@Param("adminId")long adminId,@Param("adminToken")String adminToken, 
			@Param("comId")long comId,@Param("type")int type, @Param("area")int area
			,@Param("order")int order,@Param("begintime")Date begintime,@Param("endtime")Date endtime){
		IOs_recommendService os_recommendService = new Os_recommendService();
		return os_recommendService.addRecommend(adminId, adminToken, comId, type, area, order, begintime, endtime);
	}
	/*
	 * 后台 查看审核详情
	 * 查看审核详情
	 * 获取待预置对象
	 */
	@At("/getYzcommend")
	@Ok("json:{locked:'password|salt'}")
	public Object getYzcommend(@Param("adminId")long adminId,@Param("adminToken")String adminToken, @Param("type")int type,
			@Param("username")String username,@Param("commendname")String commendname){
		IOs_recommendService os_recommendService = new Os_recommendService();
		return os_recommendService.getYzcommend(adminId, adminToken, type, username, commendname);
	}
	/*
	 * 查看审核详情
	 * type 必填
	 * oddId 必填
	 */
	@At("/getOs_examineText")
	@Ok("json:{locked:'password|salt'}")
	public Object getOs_examineText(@Param("adminId")long adminId,@Param("adminToken")String adminToken, 
			@Param("type")int type,@Param("oddId")long oddId){
		IOs_examineService os_examineService = new Os_examineService();
		return os_examineService.getOs_examineText(adminId,adminToken,type, oddId);
	}
	/*
	 * 前台 查看会员审核信息
	 * type 必填
	 * oddId 必填
	 */
	@At("/getOs_examineForindex")
	@Ok("json:{locked:'password|salt'}")
	public Object getOs_examineForindex(@Param("userid")long userid,@Param("token")String token){
		IOs_examineService os_examineService = new Os_examineService();
		return os_examineService.getOs_examineForindex(userid,token);
	}
	/*
	 * 客户申请参加展会
	 * @param user_id
	 * @param token
	 * @param shop_id
	 * @param participant_hot
	 * @param conference_id
	 * @return
	 */
	@At("/addConferenceParticipant")
	@Ok("json:{locked:'password|salt'}")
	public Object addConferenceParticipant(@Param("user_id")long user_id, @Param("token")String token,
			@Param("shop_id")long shop_id,@Param("conference_id")long conference_id){
		IConferenceService conferenceService=new ConferenceService();
		
		try {
			return conferenceService.addConferenceParticipant(user_id, token, shop_id, conference_id);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			map.put("msg", "申请操作失败");
			return map;
		}
	}
	/*
	 * 获取申请参加展会的用户
	 * @param adminId
	 * @param admin_token
	 * @param conference_id
	 * @param company_name
	 * @param pageNumber
	 * @param pageSize
	 * @return
	 */
	@At("/getConferenceParticipantlist")
	@Ok("json:{locked:'password|salt'}")
	public Object getConferenceParticipantlist(@Param("adminId")long adminId, @Param("admin_token")String admin_token,@Param("conference_id")long conference_id,
			@Param("company_name")String company_name,@Param("pageNumber")int pageNumber,@Param("pageSize")int pageSize){
		IConferenceService conferenceService=new ConferenceService();
		return conferenceService.getConferenceParticipantlist(adminId, admin_token, conference_id, company_name, pageNumber, pageSize);
	}
	/*
	 * 修改申请参加展会信息的用户的信息
	 * @param adminId
	 * @param admin_token
	 * @param id
	 * @param participant_booth
	 * @param participant_hot
	 * @param participant_status
	 * @return
	 */
	@At("/updateConferenceParticipant")
	@Ok("json:{locked:'password|salt'}")
	public Object updateConferenceParticipant(@Param("adminId")long adminId, @Param("admin_token")String admin_token, @Param("id")long id,
			@Param("participant_booth")String participant_booth,@Param("participant_hot")int participant_hot,@Param("participant_status") int participant_status,
			@Param("msg")String msg){
		IConferenceService conferenceService=new ConferenceService(); 
		try {
			return conferenceService.updateConferenceParticipant(adminId, admin_token, id, participant_booth, participant_hot, participant_status,msg);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			map.put("msg", "操作失败");
			return map;
		}
	}
	/*
	 * 前台 根据展会回去申请参加展会信息通过审核的客户
	 * @param conference_id
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	@At("/getConferenceParticipantForindex")
	@Ok("json:{locked:'password|salt'}")
	public Object getConferenceParticipantForindex(@Param("conference_id")long conference_id, @Param("pageNum")int pageNum, @Param("pageSize")int pageSize){
		IConferenceService conferenceService=new ConferenceService(); 
		return conferenceService.getConferenceParticipantForindex(conference_id, pageNum, pageSize);
	}
	/*
	 * 判断用户名是否已被使用
	 */
	@At("/isUserName")
	@Ok("json:{locked:'password|salt'}")
	public Object isUserName(@Param("username")String username ){
		IUserService userService = new UserService();
		return userService.isUserName(username);
	}
	/*
	 * 判断商铺名是否已被使用
	 */
	@At("/isShopName")
	@Ok("json:{locked:'password|salt'}")
	public Object isShopName(@Param("shopname")String shopname ){
		IShopService shopService = new ShopService();
		return shopService.isShopName(shopname);
	}
	/*
	 * 获取下拉框中的数据
	 * @param pulldown_name  内容
	 * @param pulldown_grade	等级
	 * @param pulldown_fid	父级ID
	 * @param pulldown_isshow		是否显示
	 * @param pulldown_value		子类对应的ID值
	 * @return
	 */
	@At("/getPulldown")
	@Ok("json:{locked:'password|salt'}")
	public Object getPulldown(@Param("pulldown_name")String pulldown_name,@Param("pulldown_grade")int pulldown_grade, @Param("pulldown_fid")long pulldown_fid, 
			@Param("pulldown_isshow")int pulldown_isshow,@Param("pulldown_value")int pulldown_value){
		IOs_pulldownService os_pulldownService=new Os_pulldownService();
		return os_pulldownService.getPulldown(pulldown_name, pulldown_grade, pulldown_fid, pulldown_isshow, pulldown_value);
	}
	/*
	 * 后台获取显示所有的下拉框
	 * @param admin_Id
	 * @param admin_token
	 * @return
	 */
	@At("/getPulldownlist")
	@Ok("json:{locked:'password|salt'}")
	public Object getPulldownlist(@Param("admin_Id")long admin_Id, @Param("admin_token")String admin_token){
		IOs_pulldownService os_pulldownService=new Os_pulldownService();
		return os_pulldownService.getPulldownlist(admin_Id, admin_token);
	}
	/*
	 * 添加下拉框数据
	 * @param admin_Id
	 * @param admin_token
	 * @param pulldown_name  下拉框内容
	 * @param pulldown_fid		对应的父级ID
	 * @return
	 */
	@At("/addPulldown")
	@Ok("json:{locked:'password|salt'}")
	public Object addPulldown(@Param("admin_Id")long admin_Id, @Param("admin_token")String admin_token,
			@Param("pulldown_name")String pulldown_name,@Param("pulldown_fid")long pulldown_fid){
		IOs_pulldownService os_pulldownService=new Os_pulldownService();
		return os_pulldownService.addPulldown(admin_Id, admin_token, pulldown_name, pulldown_fid);
	}
	/*
	 * 修改下拉框数据
	 * @param admin_Id
	 * @param admin_token
	 * @param pulldown_id
	 * @param pulldown_name
	 * @return
	 */
	@At("/updatePulldown")
	@Ok("json:{locked:'password|salt'}")
	public Object updatePulldown(@Param("admin_Id")long admin_Id, @Param("admin_token")String admin_token,
			@Param("pulldown_id")long pulldown_id,@Param("pulldown_name")String pulldown_name){
		IOs_pulldownService os_pulldownService=new Os_pulldownService();
		return os_pulldownService.updatePulldown(admin_Id, admin_token, pulldown_id, pulldown_name);
	}
	/*
	 * 删除下拉框中的数据
	 * @param admin_Id
	 * @param admin_token
	 * @param pulldown_id
	 * @return
	 */
	@At("/deletePulldown")
	@Ok("json:{locked:'password|salt'}")
	public Object deletePulldown(@Param("admin_Id")long admin_Id, @Param("admin_token")String admin_token,
			@Param("pulldown_id")long pulldown_id){
		IOs_pulldownService os_pulldownService=new Os_pulldownService();
		return os_pulldownService.deletePulldown(admin_Id, admin_token, pulldown_id);
	}
	/*
	 * 前台 根据用户获取对应的店铺产品审核记录
	 * @param userid
	 * @param token
	 * @return
	 */
	@At("/getOs_examineForcommdity")
	@Ok("json:{locked:'password|salt'}")
	public Object getOs_examineForcommdity(@Param("userid")long userid,@Param("token")String token){
		IOs_examineService os_examineService=new Os_examineService();
		return os_examineService.getOs_examineForcommdity(userid, token);
	}
	/*
	 * 前台 根据用户获取对应的采购单审核记录
	 * @param userid
	 * @param token
	 * @return
	 */
	@At("/getOs_examineForpurchase")
	@Ok("json:{locked:'password|salt'}")
	public Object getOs_examineForpurchase(@Param("userid")long userid,@Param("token")String token){
		IOs_examineService os_examineService=new Os_examineService();
		return os_examineService.getOs_examineForpurchase(userid, token);
	}
	/*
	 *添加物流单号
	 * @param userid
	 * @param token
	 * @param logistics_type  发货形式:0
	 * @param logistics_orderid   快递单号
	 * @param shop_orderid  对应的订单号
	 * @param logistics_company_id  快递公司对应的代号
	 * @return
	 */
	@At("/addShop_logistics")
	@Ok("json:{locked:'password|salt'}")
	public Object addShop_logistics(@Param("userid")long userid,@Param("token")String token,@Param("logistics_type")int logistics_type,
			@Param("logistics_orderid")String logistics_orderid,@Param("shop_orderid")long shop_orderid,@Param("logistics_company_id")String logistics_company_id){
		IShopService shopService = new ShopService();
		try {
			return shopService.addShop_logistics(userid, token, logistics_type, logistics_orderid, shop_orderid,logistics_company_id);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			map.put("msg", "操作失败");
			return map;
		}
	}
	/*
	 * 根据订单号获取物信息
	 * @param userid
	 * @param token
	 * @param shop_orderid
	 * @return
	 */
	@At("/getShop_logistics")
	@Ok("json:{locked:'password|salt'}")
	public Object getShop_logistics(@Param("userid")long userid,@Param("token")String token,@Param("shop_orderid")long shop_orderid){
		IShopService shopService = new ShopService();
		try {
			return shopService.getShop_logistics(userid, token, shop_orderid);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			map.put("msg", "获取数据失败");
			return map;
		}
	}
	/*
	 * 根据快递公司和快递单号获取物流信息
	 * @param userid
	 * @param token
	 * @param ty   快递公司代号
	 * @param po  快递单号
	 * @return
	 */
	@At("/getKuaidi")
	@Ok("json:{locked:'password|salt'}")
	public Object getKuaidi(@Param("userid")long userid,@Param("token")String token,@Param("ty")String ty,@Param("po")String po){
		IShopService shopService = new ShopService();
		try {
			return shopService.getKuaidi(userid, token, ty, po);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			map.put("msg", "获取数据失败");
			return map;
		}
	}
	/*
	 * 获取快递公司
	 * @return
	 */
	@At("/getShop_logistics_company")
	@Ok("json:{locked:'password|salt'}")
	public Object getShop_logistics_company(@Param("userid")long userid,@Param("token")String token){
		IShopService shopService = new ShopService();
		return shopService.getShop_logistics_company(userid, token);
	}
	/*
	 * 获取公共信息表中的内容
	 * @param adminid
	 * @param admintoken
	 * @param public_type
	 * @param public_area
	 * @return
	 */
	@At("/getOs_public")
	@Ok("json:{locked:'password|salt'}")
	public Object getOs_public(@Param("adminid")long adminid,@Param("admintoken")String admintoken,
			@Param("public_type")int public_type,@Param("public_area")int public_area){
		IOs_publicService os_publicService=new Os_publicService();
		return os_publicService.getOs_public(adminid, admintoken,public_type,public_area);
	}
	/*
	 * 修改公共信息表中的区域位置数量
	 * @param adminid
	 * @param admintoken
	 * @param public_id
	 * @param public_content
	 * @param public_number
	 * @return
	 */
	@At("/updateOs_public")
	@Ok("json:{locked:'password|salt'}")
	public Object updateOs_public(@Param("adminid")long adminid,@Param("admintoken")String admintoken,@Param("public_id")long public_id,
			@Param("public_content")String public_content,@Param("public_number")int public_number){
		IOs_publicService os_publicService=new Os_publicService();
		return os_publicService.updateOs_public(adminid,admintoken,public_id,public_content,public_number);
	}
	/*
	 * 获取用户对应的店铺ID及店铺名
	 * @param adminId
	 * @param admin_token
	 * @param user_name
	 * @return
	 */
	@At("/getUserListForShop")
	@Ok("json:{locked:'password|salt'}")
	public Object getUserListForShop(@Param("adminId")long adminId, @Param("admin_token")String admin_token,@Param("user_name")String user_name){
		IUserService userService=new UserService();
		return userService.getUserListForShop(adminId, admin_token, user_name);
	}
	/*
	 * 根据类型获取对应的商品或采购单
	 * @param adminId
	 * @param admin_token
	 * @param type
	 * @param shop_id
	 * @param user_id
	 * @return
	 */
	@At("/getUserForCommAndPur")
	@Ok("json:{locked:'password|salt'}")
	public Object getUserForCommAndPur(@Param("adminId")long adminId, @Param("admin_token")String admin_token,@Param("type")long type,
			@Param("shop_id")long shop_id,@Param("user_id")long user_id){
		IUserService userService=new UserService();
		return userService.getUserForCommAndPur(adminId, admin_token, type, shop_id, user_id); 
	}
	/*
	 * 获取采购单的详情数据
	 * @param purchase_id
	 * @return
	 */
	@At("/getShop_purchaseById")
	@Ok("json:{locked:'password|salt'}")
	public Object getShop_purchaseById(@Param("purchase_id")long purchase_id){
		IShopService shopService=new ShopService();
		return shopService.getShop_purchaseById(purchase_id);
	}
	/*
	 * 卖家中心 获取已卖过的产品
	 * @param userid
	 * @param token
	 * @param user_name  买家名称
	 * @param id
	 * @param commodity_name
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	@At("/getShop_orderForSales")
	@Ok("json:{locked:'password|salt'}")
	public Object getShop_orderForSales(@Param("userid")long userid,@Param("token")String token,@Param("user_name")String user_name,
			@Param("id")long id,@Param("commodity_name")String commodity_name,@Param("shop_id")long shop_id,@Param("pageNumber")int pageNumber,
			@Param("pageSize")int pageSize){
		IShopService shopService=new ShopService();
		return shopService.getShop_orderForSales(userid, token, user_name, id, commodity_name,shop_id, pageNumber, pageSize);
	}
	/*
	 * 获取省份
	 * @return
	 */
	@At("/getprovince")
	@Ok("json:{locked:'password|salt'}")
	public Object getprovince(){
		IOs_publicService os_publicService=new Os_publicService();
		return os_publicService.getprovince();
	}
	/*
	 * 获取省份对应的城市
	 * @param city_fid
	 * @return
	 */
	@At("/getcityForprovince")
	@Ok("json:{locked:'password|salt'}")
	public Object getcityForprovince(@Param("city_fid")long city_fid){
		IOs_publicService os_publicService=new Os_publicService();
		return os_publicService.getcityForprovince(city_fid);
	}

	/*
	 * 交易管理--发货管理
	 * 获取订单列表---订单详情表--
	 * @param userid
	 * @param token
	 * @Param("id")int id,	订单号		
	 * @Param("commodity_name")String commodity_name,货品名称
	 * pageNumber 
	 * pageSize
	 */		
	@At("/getDelivery_Management")
	@Ok("json:{locked:'password|salt'}")
	public Object getDelivery_Management(@Param("id")int id,@Param("commodity_name")String commodity_name, @Param("pageNum")int pageNumber, @Param("pageSize")int pageSize){
		 IShopService   service=new  ShopService();
		return service.getDeliver(id, commodity_name, pageNumber, pageSize);
	}
	/*
	 * 交易管理--评价管理
	 * 获取评价列表---订单详情表--
	 * @param userid
	 * @param token
	 * @Param("appraise_grade")int appraise_grade,  评价等级	 
	 * pageNumber 
	 * pageSize
	 */		
	@At("/getEvaluation_content")
	@Ok("json:{locked:'password|salt'}")
	public Object getEvaluation_content(
			@Param("shop_id")long shop_id, 
			@Param("appraise_grade")int appraise_grade,
			@Param("pageNumber")int pageNumber, @Param("pageSize")int pageSize){
		 IShopService   service=new  ShopService();
		return service.getEvaluation( shop_id, appraise_grade, pageNumber, pageSize);
	}	
	/*
	 * 交易管理--评价管理
	 * 获取评价统计列表--	
	 */		
	@At("/getEvaluation_count")
	@Ok("json:{locked:'password|salt'}")
	public Object getEvaluation_count(@Param("shop_id")long shop_id ){
		IShopService   service=new  ShopService();
		return service.getEvaluation_count(shop_id);
	}	

	/*
	 * 确认订单页面提交数据
	 * @param userid
	 * @param token
	 * @param shop_oder_id
	 * @param order_addreass_id
	 * @return
	 */
	@At("/updateShop_orderForType")
	@Ok("json:{locked:'password|salt'}")
	public Object updateShop_orderForType(@Param("userid")long userid,@Param("token")String token,
			@Param("shop_oder_id")long shop_oder_id,@Param("order_addreass_id")long order_addreass_id){
		IShopService shopService=new ShopService();
		try {
			return shopService.updateShop_orderForType(userid, token, shop_oder_id, order_addreass_id);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			map.put("msg", "操作失败");
			return map;
		}
	}
	/*
	 * 添加支付方式
	 * @param userid
	 * @param token
	 * @param pay_type
	 * @param shop_order_id
	 * @return
	 */
	@At("/addShop_pay")
	@Ok("json:{locked:'password|salt'}")
	public Object addShop_pay(@Param("userid")long userid,@Param("token")String token,@Param("pay_type")int pay_type,@Param("shop_order_id")long shop_order_id){
		IShopService shopService=new ShopService();
		return shopService.addShop_pay(userid, token, pay_type, shop_order_id);
	}
	/*
	 * 获取其他的订单
	 * @param userid
	 * @param token
	 * @param shop_id
	 * @param type			 0:买家     1卖家
	 * @param commidity_name
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	@At("/getShop_orderForAll")
	@Ok("json:{locked:'password|salt'}")
	public Object getShop_orderForAll(@Param("userid")long userid,@Param("token")String token,@Param("shop_id")long shop_id,
			@Param("type")int type,@Param("commidity_name")String commidity_name,@Param("pageNumber")int pageNumber,
			@Param("pageSize")int pageSize){
		IShopService shopService=new ShopService();
		return shopService.getShop_orderForAll(userid, token, shop_id, type, commidity_name, pageNumber, pageSize);
	}
	/*
	 * 买家中心 获取待付款的数据  参数 (先付款对应的状态)begin_status: 1        (到付款对应的状态)end_status:4
	 * 买家中心 获取待发货的数据	参数  begin_status: 2        end_status:1
	 * 买家中心 获取待收货的数据	参数  begin_status: 3        end_status:3
	 * 买家中心 获取待评价的数据	参数  begin_status: 4        end_status:2
	 * @param userid
	 * @param commidity_name
	 * @param begin_status
	 * @param end_status
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	@At("/getShop_orderForBuy")
	@Ok("json:{locked:'password|salt'}")
	public Object getShop_orderForBuy(@Param("userid")long userid,@Param("token")String token,@Param("commidity_name")String commidity_name,
			@Param("begin_status")int begin_status,@Param("end_status")int end_status,@Param("pageNumber")int pageNumber,@Param("pageSize")int pageSize){
		IShopService shopService=new ShopService();
		return shopService.getShop_orderForBuy(userid, token, commidity_name, begin_status, end_status, pageNumber, pageSize);
	}
	/*
	 * 卖家中心 获取待付款的数据  参数 (先付款对应的状态)begin_status: 1        (到付款对应的状态)end_status:4
	 * 卖家中心 获取待发货的数据	参数  begin_status: 2        end_status:1
	 * 卖家中心 获取待收货的数据	参数  begin_status: 3        end_status:3
	 * 卖家中心 获取待评价的数据	参数  begin_status: 4        end_status:2
	 * @param userid
	 * @param token
	 * @param shop_id
	 * @param commidity_name
	 * @param begin_status
	 * @param end_status
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	@At("/getShop_orderForSell")
	@Ok("json:{locked:'password|salt'}")
	public Object getShop_orderForSell(@Param("userid")long userid,@Param("token")String token,@Param("shop_id")long shop_id,
			@Param("commidity_name")String commidity_name,@Param("begin_status")int begin_status,@Param("end_status")int end_status,
			@Param("pageNumber")int pageNumber,@Param("pageSize")int pageSize){
		IShopService shopService=new ShopService();
		return shopService.getShop_orderForSell(userid, token, shop_id, commidity_name, begin_status, end_status, pageNumber, pageSize);
	}
	/*
	 * 发送消息
	 * 提醒发货
	 * @param userid
	 * @param token
	 * @param shop_id 商品对应的店铺ID
	 * @param message  发送内容
	 * @return
	 */
	@At("/addOs_message")
	@Ok("json:{locked:'password|salt'}")
	public Object addOs_message(@Param("userid")long userid,@Param("token")String token,@Param("shop_id")long shop_id,
			@Param("message")String message){
		IShopService shopService=new ShopService();
		try {
			return shopService.addOs_message(userid, token, shop_id, message);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			map.put("msg", "操作失败");
			map.put("status", "3");
			return map;
		}
	}
	/*
	 * 申请退货/退款
	 * @param userid
	 * @param token
	 * @param shop_order_id
	 * @param reason
	 * @param type   0退款    1退货
	 * @return
	 */
	@At("/addShop_sales_return")
	@Ok("json:{locked:'password|salt'}")
	public Object addShop_sales_return(@Param("userid")long userid,@Param("token")String token,@Param("shop_order_id")long shop_order_id,
			@Param("reason")String reason,@Param("type")int type){
		IShopService shopService=new ShopService();
		try {
			return shopService.addShop_sales_return(userid, token, shop_order_id, reason,type);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			map.put("msg", "操作失败");
			map.put("status", "4");
			return map;
		}
	}
}

6 回复

这是报的错

17-04-26 10:09:10.242 WARN [http-nio-8080-exec-4] Error@/uploadCommpanyInformation :
java.lang.RuntimeException: r u kidding me?! It is impossible!
	at org.nutz.lang.Lang.impossible(Lang.java:119)
	at com.tongxin.b2b.controller.Main$$FASTCLASS._invoke(Main.java:1)
	at org.nutz.lang.reflect.AbstractFastClass.invoke(AbstractFastClass.java:143)
	at org.nutz.lang.reflect.FastClassFactory.invoke(FastClassFactory.java:67)
	at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:27)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:33)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:198)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:509)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Unknown Source)
17-04-26 10:28:09.503 WARN [http-nio-8080-exec-6] Error@/uploadCommpanyInformation :
java.lang.RuntimeException: r u kidding me?! It is impossible!
	at org.nutz.lang.Lang.impossible(Lang.java:119)
	at com.tongxin.b2b.controller.Main$$FASTCLASS._invoke(Main.java:1)
	at org.nutz.lang.reflect.AbstractFastClass.invoke(AbstractFastClass.java:143)
	at org.nutz.lang.reflect.FastClassFactory.invoke(FastClassFactory.java:67)
	at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:27)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:33)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:198)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:509)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Unknown Source)

这个之前上传图片一直就是报这个错,我把上传图片的方法放到子函数了,就没问题了

升级一下, 1.r.61.r2

恩恩,可以了,谢谢大神

添加回复
请先登陆
回到顶部