| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.accept.AdminAcceptData;
|
| | | import org.apache.commons.beanutils.PropertyUtils;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "save")
|
| | | public void save(String callback, PushCoupon pushCoupon, PrintWriter out) {
|
| | | public void save(AdminAcceptData acceptData,String callback, PushCoupon pushCoupon, PrintWriter out) {
|
| | |
|
| | | try {
|
| | | pushCouponService.save(pushCoupon);
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "delete")
|
| | | public void delete(String callback, String idArray, PrintWriter out) {
|
| | | public void delete(AdminAcceptData acceptData,String callback, String idArray, PrintWriter out) {
|
| | |
|
| | | try {
|
| | | if (StringUtil.isNullOrEmpty(idArray)) {
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getPushInfo")
|
| | | public void getPushInfo(String callback, Long id, PrintWriter out) {
|
| | | public void getPushInfo(AdminAcceptData acceptData,String callback, Long id, PrintWriter out) {
|
| | |
|
| | | if (id == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("参数不能为空"));
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "query")
|
| | | public void query(String callback, Integer pageIndex, Integer pageSize, String key, Integer state, PrintWriter out) {
|
| | | public void query(AdminAcceptData acceptData, String callback, Integer pageIndex, Integer pageSize, String key, Integer state, PrintWriter out) {
|
| | |
|
| | | if (pageIndex == null || pageIndex < 1) {
|
| | | pageIndex = 1;
|
| | |
| | |
|
| | | try {
|
| | |
|
| | | List<PushCoupon> list = pushCouponService.listQuery((pageIndex - 1) * pageSize, pageSize, key, state);
|
| | | List<PushCoupon> list = pushCouponService.listQuery((pageIndex - 1) * pageSize, pageSize, key, state,acceptData.getSystem());
|
| | |
|
| | | if (list == null || list.size() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
|
| | |
| | | listVO.add(pushCouponVO);
|
| | | }
|
| | |
|
| | | long count = pushCouponService.countQuery(key, state);
|
| | | long count = pushCouponService.countQuery(key, state,acceptData.getSystem());
|
| | |
|
| | | int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
|
| | | PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
|
| | |
| | |
|
| | | /**
|
| | | * 推送
|
| | | * @param id 推送id
|
| | | * @param out
|
| | | * @throws Exception
|
| | | */
|
| | | @RequestMapping(value = "push")
|
| | | public void push(String callback, String idArray, PrintWriter out) throws Exception {
|
| | | public void push(AdminAcceptData acceptData,String callback, String idArray, PrintWriter out) throws Exception {
|
| | |
|
| | | if (idArray == null || idArray.trim().length() == 0) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("传递参数不能为空"));
|
| | |
| | |
|
| | | /**
|
| | | * 版本转换为list
|
| | | * @param pushGoods
|
| | | */
|
| | | public void convertVersionList(PushCouponVO pushCouponVO) {
|
| | | String versions = pushCouponVO.getVersions();
|
| | |
| | |
|
| | | /**
|
| | | * 转换json
|
| | | * @param pushGoods
|
| | | */
|
| | | public void convertVersion(PushCoupon pushCoupon, String arrayIOS, String arrayAndroid) {
|
| | |
|