|
|
|
@ -9,11 +9,6 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
import static com.mdp.core.utils.BaseUtils.map; |
|
|
|
|
|
|
|
@Service |
|
|
|
/** |
|
|
|
* 对mk接口调用 |
|
|
|
@ -35,50 +30,4 @@ public class MkClient { |
|
|
|
return tips; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 检查用户是否可以投标-针对私人用户 |
|
|
|
* @param userid |
|
|
|
* @param at |
|
|
|
* @param exp |
|
|
|
* @param bids |
|
|
|
* @return {tipscode:bids-not-enough,msg:投标次数超限},{tipscode:smaxExp-not-enough,msg:投标工作量超限},{tipscode:smaxAt-not-enough,msg:投标金额超限}, |
|
|
|
*/ |
|
|
|
public Tips checkMemberInterests(String userid,BigDecimal at,BigDecimal exp,Integer bids){ |
|
|
|
String url="/mk/mk/mem/memberInterests/checkMemberInterests?userid={userid}&at={at}&exp={exp}&bids={bids}"; |
|
|
|
return callBizService.getForTips(url,map("userid",userid ,"at",at,"exp",exp,"bids",bids)); |
|
|
|
} |
|
|
|
/** |
|
|
|
* 检查用户是否可以投标-针对私人用户 |
|
|
|
* @param userid |
|
|
|
* @param at |
|
|
|
* @param exp |
|
|
|
* @param bids |
|
|
|
* @return {tipscode:bids-not-enough,msg:投标次数超限},{tipscode:smaxExp-not-enough,msg:投标工作量超限},{tipscode:smaxAt-not-enough,msg:投标金额超限}, |
|
|
|
*/ |
|
|
|
public Map<String,Object> checkAndGetMemberInterests(String userid,BigDecimal at,BigDecimal exp,Integer bids){ |
|
|
|
String url="/mk/mk/mem/memberInterests/checkMemberInterests?userid={userid}&at={at}&exp={exp}&bids={bids}"; |
|
|
|
Map<String,Object> re=callBizService.getForMap(url,map("userid",userid ,"at",at,"exp",exp,"bids",bids)); |
|
|
|
return re; |
|
|
|
} |
|
|
|
/** |
|
|
|
* 检查用户是否可以投标-针对私人用户 |
|
|
|
* @param userid |
|
|
|
* @return Map |
|
|
|
*/ |
|
|
|
public Map<String, Object> getMemberDetailByUserid(String userid){ |
|
|
|
String url="/mk/mk/mem/member/detailByUserid?userid={userid}"; |
|
|
|
Map<String,Object> result= callBizService.getForMap(url,map("userid",userid)); |
|
|
|
return (Map<String, Object>) result.get("data"); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 投标成功后登记投标次数-针对私人用户 |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public Tips pushBidsAfterBidSuccess(String userid,BigDecimal at,BigDecimal exp,Integer bids){ |
|
|
|
Tips tips = new Tips("推送订单成功"); |
|
|
|
push.leftPush("xm_task_bid",map("userid",userid ,"at",at,"exp",exp,"bids",bids)); |
|
|
|
// strRedisTemplate.convertAndSend("xm_task_settle", JSON.toJSONString(params)); |
|
|
|
return tips; |
|
|
|
} |
|
|
|
} |