diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java b/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java index ff78abf7d..b31557c8e 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/web/RetailAppController.java @@ -551,7 +551,7 @@ public class RetailAppController { @RequestMapping(value = "/openim/chat",method = RequestMethod.POST) public void openimChat(@ModelAttribute(RETAIL_DEVICE) JSONObject device,@RequestBody JSONObject param) { - retailAppService.openimCheck(device); + retailAppService.addUnreadMsg(device,param); } } diff --git a/src/main/java/au/com/royalpay/payment/manage/openim/OpenimController.java b/src/main/java/au/com/royalpay/payment/manage/openim/OpenimController.java index f3ce94657..11a9d432e 100644 --- a/src/main/java/au/com/royalpay/payment/manage/openim/OpenimController.java +++ b/src/main/java/au/com/royalpay/payment/manage/openim/OpenimController.java @@ -1,14 +1,17 @@ package au.com.royalpay.payment.manage.openim; -import au.com.royalpay.payment.manage.openim.beans.OpenimUserVO; import au.com.royalpay.payment.manage.openim.core.CustomerServiceService; import au.com.royalpay.payment.manage.permission.manager.ManagerMapping; import au.com.royalpay.payment.manage.permission.manager.RequireManager; +import au.com.royalpay.payment.manage.signin.beans.LoginInfo; +import au.com.royalpay.payment.manage.signin.core.SignInStatusManager; import au.com.royalpay.payment.tools.CommonConsts; +import au.com.royalpay.payment.tools.http.HttpUtils; import au.com.royalpay.payment.tools.permission.enums.ManagerRole; import com.alibaba.fastjson.JSONObject; +import org.springframework.validation.Errors; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -19,6 +22,8 @@ import org.springframework.web.bind.annotation.RestController; import java.util.List; import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; /** * @author kira @@ -27,7 +32,8 @@ import javax.annotation.Resource; @RestController @RequestMapping("/sys/openim") public class OpenimController { - + @Resource + private SignInStatusManager signInStatusManager; @Resource private CustomerServiceService customerServiceService; @@ -37,9 +43,10 @@ public class OpenimController { return customerServiceService.checkAndSave(manager); } - @RequestMapping(value = "/findOne", method = RequestMethod.GET) - public OpenimUserVO findOne(@RequestParam int clientId, @RequestParam String userName) { - return customerServiceService.findOne(clientId, userName); + @RequestMapping(value = "/signin", method = RequestMethod.POST) + public void partnerSignIn(@RequestBody @Valid LoginInfo loginInfo, Errors errors, HttpServletResponse response) throws Exception { + HttpUtils.handleValidErrors(errors); + HttpUtils.setCookie(response, CommonConsts.MANAGER_STATUS,signInStatusManager.managerSignIn(loginInfo)); } @RequestMapping(value = "/list",method = RequestMethod.GET) diff --git a/src/main/ui/service_client.html b/src/main/ui/service_client.html index bf008b3ce..e9cc74c05 100644 --- a/src/main/ui/service_client.html +++ b/src/main/ui/service_client.html @@ -40,10 +40,7 @@ function switchTouid(touid) { window.uid = touid; WKIT.switchTouid({ - touid: touid, - logo: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531805782509&di=98f7fa48980696f8eddf7eb617a834a3&imgtype=0&src=http%3A%2F%2Fi2.hdslb.com%2Fbfs%2Fface%2F98dbd049061292bca8625caf91cff1b41ee999cd.jpg', - Avatar: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531805782509&di=98f7fa48980696f8eddf7eb617a834a3&imgtype=0&src=http%3A%2F%2Fi2.hdslb.com%2Fbfs%2Fface%2F98dbd049061292bca8625caf91cff1b41ee999cd.jpg', - toAvatar: 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1531805782509&di=98f7fa48980696f8eddf7eb617a834a3&imgtype=0&src=http%3A%2F%2Fi2.hdslb.com%2Fbfs%2Fface%2F98dbd049061292bca8625caf91cff1b41ee999cd.jpg' + touid: touid }); WKIT.Conn.sdk.Chat.setReadState({ touid: touid, diff --git a/src/main/ui/service_client_app.html b/src/main/ui/service_client_app.html new file mode 100644 index 000000000..ebefe90ef --- /dev/null +++ b/src/main/ui/service_client_app.html @@ -0,0 +1,146 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/main/ui/service_client_app_outside.html b/src/main/ui/service_client_app_outside.html new file mode 100644 index 000000000..ec7544114 --- /dev/null +++ b/src/main/ui/service_client_app_outside.html @@ -0,0 +1,72 @@ + + + + + + + +
+ + +