| | |
| | | import com.java110.entity.user.Cust; |
| | | import com.java110.feign.user.IUserService; |
| | | import com.java110.user.smo.IUserServiceSMO; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | |
| | | * 用户服务提供类 |
| | | * Created by wuxw on 2017/4/5. |
| | | */ |
| | | @RestController |
| | | //@RestController |
| | | public class UserServiceRest extends BaseController implements IUserService { |
| | | |
| | | private final static Logger logger = LoggerFactory.getLogger(UserServiceRest.class); |
| | | |
| | | @Autowired |
| | | IUserServiceSMO iUserServiceSMO; |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据购物车信息查询 |
| | | * |
| | | * 这里返回data信息 |
| | | * @param busiOrder |
| | | * @return |
| | | */ |
| | | @Override |
| | | @RequestMapping("/userService/queryCustInfoByOlId") |
| | | public String queryCustInfoByOlId(@RequestParam("busiOrder") String busiOrder) { |
| | | |
| | | |
| | | LoggerEngine.debug("queryUserInfo入参:" + busiOrder); |
| | | |
| | | |
| | | String resultUserInfo = null; |
| | | |
| | | try { |
| | | this.simpleValidateJSON(busiOrder); |
| | | resultUserInfo = iUserServiceSMO.queryCustInfoByOlId(busiOrder); |
| | | |
| | | } catch (Exception e) { |
| | | LoggerEngine.error("服务处理出现异常:", e); |
| | | resultUserInfo = ProtocolUtil.createResultMsg(ProtocolUtil.RETURN_MSG_ERROR,"服务处理出现异常"+e,null); |
| | | } finally { |
| | | LoggerEngine.debug("用户服务操作客户出参:" + resultUserInfo); |
| | | return resultUserInfo; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据购物车信息查询 需要作废的发起的报文 |
| | | * |
| | | * 这里返回data信息 |
| | | * @param busiOrder |
| | | * @return |
| | | */ |
| | | @Override |
| | | @RequestMapping("/userService/queryNeedDeleteCustInfoByOlId") |
| | | public String queryNeedDeleteCustInfoByOlId(@RequestParam("busiOrder") String busiOrder) { |
| | | |
| | | |
| | | LoggerEngine.debug("queryUserInfo入参:" + busiOrder); |
| | | |
| | | |
| | | String resultUserInfo = null; |
| | | |
| | | try { |
| | | this.simpleValidateJSON(busiOrder); |
| | | resultUserInfo = iUserServiceSMO.queryNeedDeleteCustInfoByOlId(busiOrder); |
| | | |
| | | } catch (Exception e) { |
| | | LoggerEngine.error("服务处理出现异常:", e); |
| | | resultUserInfo = ProtocolUtil.createResultMsg(ProtocolUtil.RETURN_MSG_ERROR,"服务处理出现异常"+e,null); |
| | | } finally { |
| | | LoggerEngine.debug("用户服务操作客户出参:" + resultUserInfo); |
| | | return resultUserInfo; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 用户服务信息受理 |
| | |
| | | reqUserJSON = this.simpleValidateJSON(data); |
| | | //1.0规则校验,报文是否合法 |
| | | |
| | | |
| | | //2.0 受理客户信息 |
| | | resultUserInfo = iUserServiceSMO.soUserService(reqUserJSON); |
| | | |
| | | |
| | | } catch (Exception e) { |
| | | LoggerEngine.error("服务处理出现异常:", e); |
| | |
| | | return resultUserInfo; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 这个接口专门用于订单服务受理用,入参为 JSONObject |
| | |
| | | try{ |
| | | reqParam = this.simpleValidateJSON(data); |
| | | |
| | | Assert.isNull(reqParam,"data","传入报文错误,没有包含data节点"+reqParam); |
| | | Assert.isNotNull(reqParam,"data","传入报文错误,没有包含data节点"+reqParam); |
| | | |
| | | resultUserInfo = iUserServiceSMO.soDeleteCustInfo(reqParam.getJSONArray("data")); |
| | | |