|
|
@ -11,12 +11,10 @@ import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
|
|
|
|
import au.com.royalpay.payment.tools.utils.PageListUtils;
|
|
|
|
import au.com.royalpay.payment.tools.utils.PageListUtils;
|
|
|
|
import au.com.royalpay.payment.tools.utils.QRCodeUtils;
|
|
|
|
import au.com.royalpay.payment.tools.utils.QRCodeUtils;
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.Order;
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.Order;
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
|
|
|
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
|
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.RandomStringUtils;
|
|
|
|
import org.apache.commons.lang3.RandomStringUtils;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
@ -24,12 +22,11 @@ import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.ui.Model;
|
|
|
|
import org.springframework.ui.Model;
|
|
|
|
import org.springframework.util.Assert;
|
|
|
|
import org.springframework.util.Assert;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Created by yishuqian on 20/12/2016.
|
|
|
|
* Created by yishuqian on 20/12/2016.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -77,6 +74,17 @@ public class CashierServiceImp implements CashierService {
|
|
|
|
cashierMapper.update(cashierUpdate);
|
|
|
|
cashierMapper.update(cashierUpdate);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void changeCashierValidStatus(JSONObject partner, String cashier_id,boolean isValid) {
|
|
|
|
|
|
|
|
JSONObject cashier = cashierMapper.findOne(cashier_id);
|
|
|
|
|
|
|
|
Assert.notNull(cashier, "cashier not found");
|
|
|
|
|
|
|
|
if (partner.getIntValue("client_id") != cashier.getIntValue("client_id")) {
|
|
|
|
|
|
|
|
throw new ForbiddenException("You have no permission!");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
cashier.put("is_valid", isValid);
|
|
|
|
|
|
|
|
cashierMapper.update(cashier);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public JSONObject getCashierByCashierId(String cashier_id) {
|
|
|
|
public JSONObject getCashierByCashierId(String cashier_id) {
|
|
|
|
return cashierMapper.findOne(cashier_id);
|
|
|
|
return cashierMapper.findOne(cashier_id);
|
|
|
|