package shop.alien.job.feign;

import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(url = "${feign.alienStore.url}", name = "alien-store")
public interface AlienStoreFeign {

    @GetMapping("/websocket/sendMsgToClientByPhoneId")
    JSONObject sendMsgToClientByPhoneId(
            @RequestParam(value = "messageReceiverId") String messageReceiverId,
            @RequestParam(value = "webSocketVoStr") String webSocketVoStr);

    /**
     * 转账
     *
     * @param name
     * @param idCard
     * @param phone
     * @param money
     * @return
     */
    @GetMapping("/ali/pay")
    JSONObject aliPay(
            @RequestParam(value = "name") String name,
            @RequestParam(value = "idCard") String idCard,
            @RequestParam(value = "phone") String phone,
            @RequestParam(value = "money") String money
    );

    /**
     * 删除附近商家
     *
     * @param flag
     * @param content
     * @return
     */
    @GetMapping("/near/me/delMer")
    JSONObject delMer(
            @RequestParam(value = "flag") Boolean flag,
            @RequestParam(value = "content") String content
    );

}
