|
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.caimei.entity.*;
|
|
|
import com.caimei.service.order.OrderService;
|
|
|
+import com.caimei.service.user.LoginService;
|
|
|
import com.caimei.utils.HttpRequest;
|
|
|
import com.caimei.utils.JsonMapper;
|
|
|
import com.caimei.utils.SessionHelper;
|
|
@@ -18,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpSession;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -32,6 +34,8 @@ public class OrderController {
|
|
|
|
|
|
@Autowired
|
|
|
private OrderService orderService;
|
|
|
+ @Autowired
|
|
|
+ private LoginService loginService;
|
|
|
@Value("${miniprogram.AppId}")
|
|
|
private String AppId;
|
|
|
@Value("${miniprogram.AppSecret}")
|
|
@@ -145,7 +149,11 @@ public class OrderController {
|
|
|
WxJsonModel wxJsonModel = WxJsonModel.newInstance();
|
|
|
logger.info(">>>>>>订单信息params:" + params);
|
|
|
//检查用户是否登入
|
|
|
- CmOperationUser currentUser = SessionHelper.getCurrentUser(request);
|
|
|
+// CmOperationUser currentUser = SessionHelper.getCurrentUser(request);
|
|
|
+ HttpSession session = request.getSession();
|
|
|
+ String openid = (String) session.getAttribute("openid");
|
|
|
+ Integer organizeID1 = (Integer) session.getAttribute("organizeID");
|
|
|
+ CmOperationUser currentUser = loginService.doLogin(openid, organizeID1);
|
|
|
if (null == currentUser) {
|
|
|
return wxJsonModel.error("1000", "用户账户异常");
|
|
|
}
|