基于javaweb+mysql的ssm+maven宠物领养宠物商城流浪动物管理系统(java+ssm+vue+maven+mysql)
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8、Node.js≥10
开发工具
后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb+mysql的SSM+Maven宠物领养宠物商城流浪动物管理系统(java+ssm+vue+maven+mysql)
一、项目运行 环境配置:
Jdk1.8 + Tomcat8.5 + Mysql + HBuilderX(Webstorm也行)+ Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)。
项目技术:
Spring + SpringMvc+ mybatis + Maven + Vue 等等组成,B/S模式 + Maven管理等等。
*/
@IgnoreAuth
@RequestMapping("/remind/{tableName}/{columnName}/{type}")
public R remindCount(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("table", tableName);
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
int count = commonService.remindCount(map);
return R.ok().put("count", count);
}
/**
* 单列求和
*/
@IgnoreAuth
@RequestMapping("/cal/{tableName}/{columnName}")
public R cal(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("column", columnName);
Map<String, Object> result = commonService.selectCal(params);
return R.ok().put("data", result);
chongwuguashi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(chongwuguashi);
chongwuguashiService.insert(chongwuguashi);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody ChongwuguashiEntity chongwuguashi, HttpServletRequest request){
chongwuguashi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(chongwuguashi);
chongwuguashiService.insert(chongwuguashi);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody ChongwuguashiEntity chongwuguashi, HttpServletRequest request){
//ValidatorUtils.validateEntity(chongwuguashi);
chongwuguashiService.updateById(chongwuguashi);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
chongwuguashiService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
public R update(@RequestBody DiscusschongwuguashiEntity discusschongwuguashi, HttpServletRequest request){
//ValidatorUtils.validateEntity(discusschongwuguashi);
discusschongwuguashiService.updateById(discusschongwuguashi);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
discusschongwuguashiService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
* 查询
*/
@RequestMapping("/query")
public R query(ChongwulingyangEntity chongwulingyang){
EntityWrapper< ChongwulingyangEntity> ew = new EntityWrapper< ChongwulingyangEntity>();
ew.allEq(MPUtil.allEQMapPre( chongwulingyang, "chongwulingyang"));
ChongwulingyangView chongwulingyangView = chongwulingyangService.selectView(ew);
return R.ok("查询宠物领养成功").put("data", chongwulingyangView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
ChongwulingyangEntity chongwulingyang = chongwulingyangService.selectById(id);
return R.ok().put("data", chongwulingyang);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
ChongwulingyangEntity chongwulingyang = chongwulingyangService.selectById(id);
return R.ok().put("data", chongwulingyang);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody ChongwulingyangEntity chongwulingyang, HttpServletRequest request){
chongwulingyang.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(chongwulingyang);
chongwulingyangService.insert(chongwulingyang);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody ChongwulingyangEntity chongwulingyang, HttpServletRequest request){
EntityWrapper<ChongwulingyangEntity> ew = new EntityWrapper<ChongwulingyangEntity>();
ew.allEq(MPUtil.allEQMapPre( chongwulingyang, "chongwulingyang"));
return R.ok().put("data", chongwulingyangService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(ChongwulingyangEntity chongwulingyang){
EntityWrapper< ChongwulingyangEntity> ew = new EntityWrapper< ChongwulingyangEntity>();
ew.allEq(MPUtil.allEQMapPre( chongwulingyang, "chongwulingyang"));
ChongwulingyangView chongwulingyangView = chongwulingyangService.selectView(ew);
return R.ok("查询宠物领养成功").put("data", chongwulingyangView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
ChongwulingyangEntity chongwulingyang = chongwulingyangService.selectById(id);
return R.ok().put("data", chongwulingyang);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
ChongwulingyangEntity chongwulingyang = chongwulingyangService.selectById(id);
return R.ok().put("data", chongwulingyang);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody ChongwulingyangEntity chongwulingyang, HttpServletRequest request){
chongwulingyang.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(chongwulingyang);
chatService.updateForSet("isreply=0", new EntityWrapper<ChatEntity>().eq("userid", chat.getUserid()));
chat.setAdminid((Long)request.getSession().getAttribute("userId"));
}
chatService.insert(chat);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody ChatEntity chat, HttpServletRequest request){
//ValidatorUtils.validateEntity(chat);
chatService.updateById(chat);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
chatService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
int count = commonService.remindCount(map);
return R.ok().put("count", count);
}
/**
* 单列求和
*/
@IgnoreAuth
@RequestMapping("/cal/{tableName}/{columnName}")
public R cal(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("column", columnName);
Map<String, Object> result = commonService.selectCal(params);
return R.ok().put("data", result);
}
/**
* 分组统计
*/
@IgnoreAuth
@RequestMapping("/group/{tableName}/{columnName}")
public R group(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("column", columnName);
List<Map<String, Object>> result = commonService.selectGroup(params);
return R.ok().put("data", result);
}
/**
* (按值统计)
*/
@IgnoreAuth
@RequestMapping("/value/{tableName}/{xColumnName}/{yColumnName}")
public R value(@PathVariable("tableName") String tableName, @PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
List<Map<String, Object>> result = commonService.selectValue(params);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
@RequestMapping("/query")
public R query(DiscusschongwuyongpinEntity discusschongwuyongpin){
EntityWrapper< DiscusschongwuyongpinEntity> ew = new EntityWrapper< DiscusschongwuyongpinEntity>();
ew.allEq(MPUtil.allEQMapPre( discusschongwuyongpin, "discusschongwuyongpin"));
DiscusschongwuyongpinView discusschongwuyongpinView = discusschongwuyongpinService.selectView(ew);
return R.ok("查询宠物用品评论表成功").put("data", discusschongwuyongpinView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
DiscusschongwuyongpinEntity discusschongwuyongpin = discusschongwuyongpinService.selectById(id);
return R.ok().put("data", discusschongwuyongpin);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
DiscusschongwuyongpinEntity discusschongwuyongpin = discusschongwuyongpinService.selectById(id);
return R.ok().put("data", discusschongwuyongpin);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody DiscusschongwuyongpinEntity discusschongwuyongpin, HttpServletRequest request){
discusschongwuyongpin.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(discusschongwuyongpin);
discusschongwuyongpinService.insert(discusschongwuyongpin);
return R.ok();
}
/**
/**
* 宠物商店
* 后端接口
* @email
*/
@RestController
@RequestMapping("/chongwushangdian")
public class ChongwushangdianController {
@Autowired
private ChongwushangdianService chongwushangdianService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ChongwushangdianEntity chongwushangdian, HttpServletRequest request){
EntityWrapper<ChongwushangdianEntity> ew = new EntityWrapper<ChongwushangdianEntity>();
PageUtils page = chongwushangdianService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chongwushangdian), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ChongwushangdianEntity chongwushangdian, HttpServletRequest request){
EntityWrapper<ChongwushangdianEntity> ew = new EntityWrapper<ChongwushangdianEntity>();
PageUtils page = chongwushangdianService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chongwushangdian), params), params));
/**
* 地址
* 后端接口
* @email
*/
@RestController
@RequestMapping("/address")
public class AddressController {
@Autowired
private AddressService addressService;
public R list(@RequestParam Map<String, Object> params,DiscusschongwuyongpinEntity discusschongwuyongpin, HttpServletRequest request){
EntityWrapper<DiscusschongwuyongpinEntity> ew = new EntityWrapper<DiscusschongwuyongpinEntity>();
PageUtils page = discusschongwuyongpinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, discusschongwuyongpin), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( DiscusschongwuyongpinEntity discusschongwuyongpin){
EntityWrapper<DiscusschongwuyongpinEntity> ew = new EntityWrapper<DiscusschongwuyongpinEntity>();
ew.allEq(MPUtil.allEQMapPre( discusschongwuyongpin, "discusschongwuyongpin"));
return R.ok().put("data", discusschongwuyongpinService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(DiscusschongwuyongpinEntity discusschongwuyongpin){
EntityWrapper< DiscusschongwuyongpinEntity> ew = new EntityWrapper< DiscusschongwuyongpinEntity>();
ew.allEq(MPUtil.allEQMapPre( discusschongwuyongpin, "discusschongwuyongpin"));
DiscusschongwuyongpinView discusschongwuyongpinView = discusschongwuyongpinService.selectView(ew);
return R.ok("查询宠物用品评论表成功").put("data", discusschongwuyongpinView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
DiscusschongwuyongpinEntity discusschongwuyongpin = discusschongwuyongpinService.selectById(id);
return R.ok().put("data", discusschongwuyongpin);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
DiscusschongwuyongpinEntity discusschongwuyongpin = discusschongwuyongpinService.selectById(id);
return R.ok().put("data", discusschongwuyongpin);
}
/**
* 用户
* 后端接口
* @email
*/
@RestController
@RequestMapping("/yonghu")
public class YonghuController {
@Autowired
private YonghuService yonghuService;
@Autowired
private TokenService tokenService;
/**
* 登录
*/
@IgnoreAuth
@RequestMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {
YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", username));
if(user==null || !user.getMima().equals(password)) {
return R.error("账号或密码不正确");
}
String token = tokenService.generateToken(user.getId(), username,"yonghu", "用户" );
return R.ok().put("token", token);
}
/**
* 注册
*/
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody ShangpinfenleiEntity shangpinfenlei, HttpServletRequest request){
shangpinfenlei.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(shangpinfenlei);
shangpinfenleiService.insert(shangpinfenlei);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody ShangpinfenleiEntity shangpinfenlei, HttpServletRequest request){
shangpinfenlei.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(shangpinfenlei);
shangpinfenleiService.insert(shangpinfenlei);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody ShangpinfenleiEntity shangpinfenlei, HttpServletRequest request){
//ValidatorUtils.validateEntity(shangpinfenlei);
shangpinfenleiService.updateById(shangpinfenlei);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
shangpinfenleiService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
ChongwulingyangEntity chongwulingyang = chongwulingyangService.selectById(id);
return R.ok().put("data", chongwulingyang);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
ChongwulingyangEntity chongwulingyang = chongwulingyangService.selectById(id);
return R.ok().put("data", chongwulingyang);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody ChongwulingyangEntity chongwulingyang, HttpServletRequest request){
chongwulingyang.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(chongwulingyang);
chongwulingyangService.insert(chongwulingyang);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody ChongwulingyangEntity chongwulingyang, HttpServletRequest request){
chongwulingyang.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(chongwulingyang);
chongwulingyangService.insert(chongwulingyang);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody ChongwulingyangEntity chongwulingyang, HttpServletRequest request){
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody ChongwulingyangEntity chongwulingyang, HttpServletRequest request){
chongwulingyang.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(chongwulingyang);
chongwulingyangService.insert(chongwulingyang);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody ChongwulingyangEntity chongwulingyang, HttpServletRequest request){
//ValidatorUtils.validateEntity(chongwulingyang);
chongwulingyangService.updateById(chongwulingyang);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
chongwulingyangService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,AddressEntity address, HttpServletRequest request){
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
address.setUserid((Long)request.getSession().getAttribute("userId"));
}
EntityWrapper<AddressEntity> ew = new EntityWrapper<AddressEntity>();
PageUtils page = addressService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, address), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,AddressEntity address, HttpServletRequest request){
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
address.setUserid((Long)request.getSession().getAttribute("userId"));
}
EntityWrapper<AddressEntity> ew = new EntityWrapper<AddressEntity>();
PageUtils page = addressService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, address), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( AddressEntity address){
EntityWrapper<AddressEntity> ew = new EntityWrapper<AddressEntity>();
ew.allEq(MPUtil.allEQMapPre( address, "address"));
return R.ok().put("data", addressService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(AddressEntity address){
EntityWrapper< AddressEntity> ew = new EntityWrapper< AddressEntity>();
ew.allEq(MPUtil.allEQMapPre( address, "address"));
AddressView addressView = addressService.selectView(ew);
return R.ok("查询地址成功").put("data", addressView);
}
/**
* 后端详情
*/
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<ChongwuyongpinEntity> wrapper = new EntityWrapper<ChongwuyongpinEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = chongwuyongpinService.selectCount(wrapper);
return R.ok().put("count", count);
}
/**
* 前端智能排序
*/
@IgnoreAuth
@RequestMapping("/autoSort")
public R autoSort(@RequestParam Map<String, Object> params,ChongwuyongpinEntity chongwuyongpin, HttpServletRequest request,String pre){
EntityWrapper<ChongwuyongpinEntity> ew = new EntityWrapper<ChongwuyongpinEntity>();
Map<String, Object> newMap = new HashMap<String, Object>();
Map<String, Object> param = new HashMap<String, Object>();
Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String, Object> entry = it.next();
String key = entry.getKey();
String newKey = entry.getKey();
if (pre.endsWith(".")) {
newMap.put(pre + newKey, entry.getValue());