提交 8f23bda8 authored 作者: zhouzhigang's avatar zhouzhigang

--no commit message

上级 f1fa55ed
package com.zrqx.bg.member.controller.scoreset;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zrqx.bg.member.service.scoreset.ScoreSetService;
import com.zrqx.core.constant.member.MemberRequestPath;
import com.zrqx.core.model.member.scorerecord.ScoreSet;
import com.zrqx.core.util.response.CallBack;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@RestController
@RequestMapping(MemberRequestPath.BG + MemberRequestPath.SCORE_SET)
@Api(description = "积分设置")
public class ScoreSetController {
@Autowired
private ScoreSetService scoreSetService;
@ApiOperation(value = "积分设置详情",notes = "积分设置详情")
@GetMapping(MemberRequestPath.LIST)
public CallBack<List<ScoreSet>> getScoreRecordSet(){
return CallBack.success(scoreSetService.selectAll());
}
@ApiOperation(value = "新增", notes = "新增一个")
@PostMapping(value = MemberRequestPath.SAVE)
public CallBack<Boolean> saveSchool(@RequestBody ScoreSet form) throws Exception{
return scoreSetService.insertSelective(form) ? CallBack.success(true) : CallBack.fail();
}
@ApiOperation(value = "修改", notes = "修改")
@PostMapping(value = MemberRequestPath.UPDATE)
public CallBack<Boolean> updateSchoolInfo(@RequestBody ScoreSet form) throws Exception {
return scoreSetService.updateByPrimaryKeySelective(form) ? CallBack.success(true) : CallBack.fail();
}
@ApiOperation(value = "查询", notes = "根据id查询")
@GetMapping(value = MemberRequestPath.OID)
public CallBack<ScoreSet> getByOid(@PathVariable Integer oid){
return CallBack.success(scoreSetService.selectByPrimaryKey(oid));
}
}
package com.zrqx.bg.member.mapper.scoreset;
import org.apache.ibatis.annotations.Mapper;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.member.scorerecord.ScoreSet;
@Mapper
public interface ScoreSetMapper extends BaseMapper<ScoreSet>{
}
package com.zrqx.bg.member.service.scoreset;
import com.zrqx.core.model.member.scorerecord.ScoreSet;
import com.zrqx.core.service.BaseService;
public interface ScoreSetService extends BaseService<ScoreSet,Integer>{
}
package com.zrqx.bg.member.service.scoreset;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zrqx.bg.member.mapper.scoreset.ScoreSetMapper;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.member.scorerecord.ScoreSet;
import com.zrqx.core.service.BaseModelServiceImpl;
@Service
public class ScoreSetServiceImpl extends BaseModelServiceImpl<ScoreSet,Integer> implements ScoreSetService{
@Autowired
private ScoreSetMapper scoreSetMapper;
@Override
public BaseMapper<ScoreSet> getMapper() {
return scoreSetMapper;
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论