Merge branch 'baotou-signup' of e.coding.net:tsteam/btsaqscksfwpt/system-examination-signup into baotou-signup

This commit is contained in:
wans 2021-05-15 14:53:29 +08:00
commit 6eb6236781
2 changed files with 12 additions and 11 deletions

View File

@ -12,8 +12,8 @@ import org.springframework.web.servlet.ModelAndView;
@Api(tags = ISystemConstant.API_TAGS_APP_ROUTE_PREFIX + "培训机构信息接口")
@RestController
@RequestMapping(ISystemConstant.APP_ROUTE_PREFIX + "/trainingInstitution")
public class TrainingInstitutionController {
@RequestMapping(ISystemConstant.APP_ROUTE_PREFIX + "/traininginstitutionroute")
public class TrainingInstitutionRouteController {
@ApiOperation(value = "角色统计页面", notes = "角色统计页面接口")

View File

@ -44,6 +44,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.apache.commons.codec.binary.Base64;
import javax.imageio.ImageIO;
import java.io.ByteArrayOutputStream;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
@ -248,15 +251,13 @@ public class ApplyServiceImpl extends DefaultBaseService implements IApplyServic
return new SuccessResultList<>(list, trainingInstitutionWorkTypeList.getPage(), trainingInstitutionWorkTypeList.getTotal());
}
public String createQrCode(String iId){
//QRCodeUtil.createQrCode()
//
// ByteArrayOutputStream stream = new ByteArrayOutputStream();
// ImageIO.write(image, "png", stream);
// // 对字节数组Base64编码
// Base64 base = new Base64();
// String base64 = base.encodeToString(stream.toByteArray());
return "";
public String createQrCode(String iId) throws Exception{
ByteArrayOutputStream stream = new ByteArrayOutputStream();
ImageIO.write(QRCodeUtil.createQrCode(60,60,"12313",null), "png", stream);
// 对字节数组Base64编码
Base64 base = new Base64();
String base64 = base.encodeToString(stream.toByteArray());
return base64;
}