{
int result = Constants.Base.FAIL;
UserMerchantCriteria umc = new UserMerchantCriteria();
Criteria criteria = umc.createCriteria();
criteria.andUserIdEqualTo(userMerchant.getUserId());
criteria.andMerchantIdEqualTo(userMerchant.getMerchantId());
List<UserMerchant> userMerchants = userMerchantMapper.selectByCriteria(umc);
if (userMerchants.size() < 1)
{
if(userMerchantMapper.updateByPrimaryKeySelective(userMerchant) > 0)